From a505383d6a42259b96f5882b493f328bc1dd9301 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 12 Oct 2021 13:22:54 -0400 Subject: lib: Add a thread_is_scheduled function The function thread_is_scheduled allows us to know if the particular thread is scheduled for execution or not. Signed-off-by: Donald Sharp --- lib/thread.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/thread.c') diff --git a/lib/thread.c b/lib/thread.c index 835aa38115..71d7798af5 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -2059,3 +2059,11 @@ void debug_signals(const sigset_t *sigs) zlog_debug("%s: %s", __func__, buf); } + +bool thread_is_scheduled(struct thread *thread) +{ + if (thread == NULL) + return false; + + return true; +} -- cgit v1.2.3