Commit c7388789 authored by Jim Harris's avatar Jim Harris Committed by Konrad Sztyber
Browse files

thread: document that spdk_poller_unregister() can take pointer to NULL



We encourage taking advantage of this in code reviews, but the
header file doesn't say anything about it which makes it difficult
for new users of the API to know it upfront.

While here, also document that this function will write NULL to
the ppoller output parameter and what that is useful.

Signed-off-by: default avatarJim Harris <jim.harris@samsung.com>
Change-Id: Iad06cbb48ddd01b14625257937b289f2f34d53ad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23933


Community-CI: Mellanox Build Bot
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent 7066331a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -626,6 +626,13 @@ struct spdk_poller *spdk_poller_register_named(spdk_poller_fn fn,
/**
 * Unregister a poller on the current thread.
 *
 * This function will also write NULL to the spdk_poller pointer pointed
 * to by ppoller, to help encourage a poller pointer not getting reused
 * after it has been unregistered.
 *
 * It is OK to pass a ppoller parameter that points to NULL, in this case
 * the function is a nop.
 *
 * \param ppoller The poller to unregister.
 */
void spdk_poller_unregister(struct spdk_poller **ppoller);