Message ID | 1406130904-13512-1-git-send-email-taras.kondratiuk@linaro.org |
---|---|
State | Accepted |
Commit | 108d078a751449cb674783e6ea783fcce97a6586 |
Headers | show |
Merged, thanks, Maxim. On 07/23/2014 07:55 PM, Taras Kondratiuk wrote: > If odp_init_local() failed the thread should not run further. > > Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> > --- > platform/linux-generic/odp_linux.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/platform/linux-generic/odp_linux.c b/platform/linux-generic/odp_linux.c > index 10fdf44..6e2b448 100644 > --- a/platform/linux-generic/odp_linux.c > +++ b/platform/linux-generic/odp_linux.c > @@ -19,6 +19,7 @@ > #include <odp_thread.h> > #include <odp_init.h> > #include <odp_system_info.h> > +#include <odp_debug.h> > > > typedef struct { > @@ -34,7 +35,11 @@ static void *odp_run_start_routine(void *arg) > odp_start_args_t *start_args = arg; > > /* ODP thread local init */ > - odp_init_local(start_args->thr_id); > + if (odp_init_local(start_args->thr_id)) { > + ODP_ERR("Local init failed for thread: %d\n", > + start_args->thr_id); > + return NULL; > + } > > return start_args->start_routine(start_args->arg); > }
diff --git a/platform/linux-generic/odp_linux.c b/platform/linux-generic/odp_linux.c index 10fdf44..6e2b448 100644 --- a/platform/linux-generic/odp_linux.c +++ b/platform/linux-generic/odp_linux.c @@ -19,6 +19,7 @@ #include <odp_thread.h> #include <odp_init.h> #include <odp_system_info.h> +#include <odp_debug.h> typedef struct { @@ -34,7 +35,11 @@ static void *odp_run_start_routine(void *arg) odp_start_args_t *start_args = arg; /* ODP thread local init */ - odp_init_local(start_args->thr_id); + if (odp_init_local(start_args->thr_id)) { + ODP_ERR("Local init failed for thread: %d\n", + start_args->thr_id); + return NULL; + } return start_args->start_routine(start_args->arg); }
If odp_init_local() failed the thread should not run further. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> --- platform/linux-generic/odp_linux.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)