From 43d7867243109975109b67f1bb1a8a3c1ad19ab4 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Wed, 18 Dec 2019 17:05:50 -0500 Subject: [PATCH] lib/thread: Update comment for spdk_thread_poll about thread exiting Remove the description "return -1 if thread has exited" and add the description "If the thread has exited, return immediately" instead. Signed-off-by: Shuhei Matsumoto Change-Id: If4b4b565dc7aa1261fa7c3fdfb73cfc814e38d5d Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478385 Tested-by: SPDK CI Jenkins Community-CI: SPDK CI Jenkins Reviewed-by: Tomasz Zawadzki Reviewed-by: Jim Harris Reviewed-by: Paul Luse --- include/spdk/thread.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/spdk/thread.h b/include/spdk/thread.h index 881a6c18f..695c8e37d 100644 --- a/include/spdk/thread.h +++ b/include/spdk/thread.h @@ -272,7 +272,8 @@ struct spdk_thread *spdk_thread_get_from_ctx(void *ctx); /** * Perform one iteration worth of processing on the thread. This includes - * both expired and continuous pollers as well as messages. + * both expired and continuous pollers as well as messages. If the thread + * has exited, return immediately. * * \param thread The thread to process * \param max_msgs The maximum number of messages that will be processed. @@ -280,7 +281,7 @@ struct spdk_thread *spdk_thread_get_from_ctx(void *ctx); * \param now The current time, in ticks. Optional. If 0 is passed, this * function may call spdk_get_ticks() to get the current time. * - * \return 1 if work was done. 0 if no work was done. -1 if thread has exited. + * \return 1 if work was done. 0 if no work was done. */ int spdk_thread_poll(struct spdk_thread *thread, uint32_t max_msgs, uint64_t now);