event: Move thread lib init/fini into reactor.c
Keep all of the thread library interactions in one file. Change-Id: Iecb20d3767190b5da105a29670ead9e192d03257 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/440761 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
836356f2d5
commit
514358e5d3
@ -624,8 +624,6 @@ spdk_app_start(struct spdk_app_opts *opts, spdk_event_fn start_fn,
|
||||
spdk_log_open();
|
||||
SPDK_NOTICELOG("Total cores available: %d\n", spdk_env_get_core_count());
|
||||
|
||||
spdk_thread_lib_init(NULL);
|
||||
|
||||
/*
|
||||
* If mask not specified on command line or in configuration file,
|
||||
* reactor_mask will be 0x1 which will enable core 0 to run one
|
||||
@ -698,7 +696,6 @@ spdk_app_fini(void)
|
||||
spdk_reactors_fini();
|
||||
spdk_conf_free(g_spdk_app.config);
|
||||
spdk_log_close();
|
||||
spdk_thread_lib_fini();
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -406,6 +406,8 @@ spdk_reactors_init(unsigned int max_delay_us)
|
||||
|
||||
memset(g_reactors, 0, (last_core + 1) * sizeof(struct spdk_reactor));
|
||||
|
||||
spdk_thread_lib_init(NULL);
|
||||
|
||||
SPDK_ENV_FOREACH_CORE(i) {
|
||||
reactor = spdk_reactor_get(i);
|
||||
spdk_reactor_construct(reactor, i, max_delay_us);
|
||||
@ -422,6 +424,8 @@ spdk_reactors_fini(void)
|
||||
uint32_t i;
|
||||
struct spdk_reactor *reactor;
|
||||
|
||||
spdk_thread_lib_fini();
|
||||
|
||||
SPDK_ENV_FOREACH_CORE(i) {
|
||||
reactor = spdk_reactor_get(i);
|
||||
if (spdk_likely(reactor != NULL) && reactor->events != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user