The last ODP thread should call term global. Local term returns which thread was the last one. As long as you leave one thread not terminated, you can create and term threads multiple times. Global term is called only when you have 0 ODP threads left.
-Petri > -----Original Message----- > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT > Nicolas Morey-Chaisemartin > Sent: Wednesday, October 21, 2015 10:16 AM > To: lng-odp@lists.linaro.org > Subject: [lng-odp] [PATCH] helper: linux: do not call odp_term_global on > thread exit > > Remove the call to odp_term_global when a thread returns. > This causes some serious side effects (and bugs) when thread are > created and joined "dynamically". > > Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu> > --- > helper/linux.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/helper/linux.c b/helper/linux.c > index 3d3b6b8..af1da17 100644 > --- a/helper/linux.c > +++ b/helper/linux.c > @@ -36,8 +36,6 @@ static void *odp_run_start_routine(void *arg) > int ret = odp_term_local(); > if (ret < 0) > ODPH_ERR("Local term failed\n"); > - else if (ret == 0 && odp_term_global()) > - ODPH_ERR("Global term failed\n"); > > return ret_ptr; > } > -- > 2.6.1.3.g8d02103 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp