Loading
example/accel_perf: cleanup worker on init errors
There are multiple paths where worker initialization can fail in _init_thread(). Multiple spdk_threads should not call spdk_app_stop(), instead each one should call exit on itself and only the last one calls the spdk_app_stop(). This patch fixes this by removing spdk_app_stop() from _init_thread(). Instead consolidate that through unregister_worker() that is called at the end of shutdown_cb(). When worker cannot be allocated, thread_exit can be called immediately. Signed-off-by:Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ia6d2d409e51c859e24cd02b0799769be535db3f7 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21064 Community-CI: Mellanox Build Bot Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Jim Harris <jim.harris@samsung.com> Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com>