This is a preparation to support voluntary thread termination by calling spdk_thread_exit(). Previously, the exiting thread had discarded all pending mesasges. We change this to stop accepting any new message in spdk_thread_send_msg() and reap pending messages in _spdk_msg_queue_run_batch(). Add unit test case for the new behavior. Adding g_ prefix to global variables for clarification is done together. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Ida78e7bb1b86357602aea6938dd514897b67edd6 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/482 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> |
||
---|---|---|
.. | ||
.gitignore | ||
Makefile | ||
thread_ut.c |