From a8074147b5d57a544d99899394859ea9e9e9972d Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Fri, 9 Sep 2022 16:03:29 +0000 Subject: [PATCH] thread: note that spdk_thread_get_last_tsc(NULL) is allowed The code has always supported this, it just wasn't documented in the header file. If caller passes NULL, it will use the current thread to get the TSC. This is actually the most common case. Signed-off-by: Jim Harris Change-Id: I39ba8260f0cb277b9272441bd336294c3327d5de Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14442 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker Reviewed-by: Changpeng Liu Reviewed-by: Shuhei Matsumoto --- include/spdk/thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdk/thread.h b/include/spdk/thread.h index eb54db7bb..6b8eb789f 100644 --- a/include/spdk/thread.h +++ b/include/spdk/thread.h @@ -439,7 +439,7 @@ int spdk_thread_get_stats(struct spdk_thread_stats *stats); /** * Return the TSC value from the end of the last time this thread was polled. * - * \param thread Thread to query. + * \param thread Thread to query. If NULL, use current thread. * * \return TSC value from the end of the last time this thread was polled. */