thread: Add check if the correct thread called spdk_poller_pause/resume()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Ie2156a331bc2384a1cebe66fcddb90ef5aa1c380 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7661 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> 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> Reviewed-by: <dongx.yi@intel.com>
This commit is contained in:
parent
be6a01efb3
commit
d5b7f3c580
@ -1355,6 +1355,12 @@ spdk_poller_pause(struct spdk_poller *poller)
|
||||
return;
|
||||
}
|
||||
|
||||
if (poller->thread != thread) {
|
||||
SPDK_ERRLOG("different from the thread that called spdk_poller_pause()\n");
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
|
||||
/* If a poller is paused from within itself, we can immediately move it
|
||||
* on the paused_pollers list. Otherwise we just set its state to
|
||||
* SPDK_POLLER_STATE_PAUSING and let spdk_thread_poll() move it. It
|
||||
@ -1391,6 +1397,12 @@ spdk_poller_resume(struct spdk_poller *poller)
|
||||
return;
|
||||
}
|
||||
|
||||
if (poller->thread != thread) {
|
||||
SPDK_ERRLOG("different from the thread that called spdk_poller_resume()\n");
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
|
||||
/* If a poller is paused it has to be removed from the paused pollers
|
||||
* list and put on the active / timer list depending on its
|
||||
* period_ticks. If a poller is still in the process of being paused,
|
||||
|
Loading…
Reference in New Issue
Block a user