Spdk/lib/thread
Shuhei Matsumoto 42ad32da60 thread: Change if-else_if to switch-case blocks of spdk_poller_pause/resume()
It will be sufficiently reasonable to check if the caller thread is valid
even if spdk_poller_pause() or spdk_poller_resume() does nothing.
Besides, let's write all possibles states explicitly in switch - cases.

This refactoring clarifies the logic and makes the following patches easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1163eff388fe741d6b6924f474a82b1aa7d18acb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7665
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-05-13 10:03:44 +00:00
..
Makefile thread: Add SPDK internal APIs spdk_thread_get_first/next_active/timed/paused_poller() 2021-05-13 10:03:44 +00:00
spdk_thread.map thread: Add SPDK internal APIs spdk_thread_get_first/next_active/timed/paused_poller() 2021-05-13 10:03:44 +00:00
thread.c thread: Change if-else_if to switch-case blocks of spdk_poller_pause/resume() 2021-05-13 10:03:44 +00:00