diff options
Diffstat (limited to 'platform/linux-generic/odp_init.c')
-rw-r--r-- | platform/linux-generic/odp_init.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c index 9e734f1a6..0cb60cdfa 100644 --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@ -12,6 +12,7 @@ #include <odp_init_internal.h> #include <odp_schedule_if.h> #include <odp_libconfig_internal.h> +#include <odp/api/plat/thread_inlines.h> #include <string.h> #include <stdio.h> #include <unistd.h> @@ -173,9 +174,6 @@ static int term_global(enum init_stage stage) } /* Fall through */ - case RANDOM_INIT: - /* Fall through */ - case TIMER_INIT: if (_odp_timer_term_global()) { ODP_ERR("ODP timer term failed.\n"); @@ -283,8 +281,8 @@ static int term_global(enum init_stage stage) } /* Fall through */ - case NO_INIT: - ; + default: + break; } return rc; @@ -411,9 +409,6 @@ int odp_init_global(odp_instance_t *instance, } stage = TIMER_INIT; - /* No init neeeded */ - stage = RANDOM_INIT; - if (_odp_crypto_init_global()) { ODP_ERR("ODP crypto init failed.\n"); goto init_failed; @@ -537,7 +532,7 @@ static int term_local(enum init_stage stage) rc = -1; } else { if (!rc) - rc = rc_thd; + rc = (rc_thd == 0) ? 0 : 1; } /* Fall through */ @@ -629,3 +624,8 @@ int odp_term_local(void) { return term_local(ALL_INIT); } + +void odp_log_thread_fn_set(odp_log_func_t func) +{ + _odp_this_thread->log_fn = func; +} |