Spdk/lib/thread
Shuhei Matsumoto c204c3d786 thread: Change TAILQ_FOREACH_SAFE to TAILQ_FIRST() and _NEXT() for timed poller
When we introduce red black tree for timed pollers, we will not use
RB_FOREACH_SAFE() but cache the leftmost (smallest) node and iterate
from it via RB_NEXT() instead.

As another preparation, separate TAILQ_FOREACH_SAFE() into TAILQ_FIRST()
and TAILQ_NEXT().

The next patch will cache the first element to thread and refer it
first.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie03c387b5b3a055c668e7b439a5eb05ed77eaa81
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7718
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 TAILQ_FOREACH_SAFE to TAILQ_FIRST() and _NEXT() for timed poller 2021-05-13 10:03:44 +00:00