summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/thread.c8
-rw-r--r--lib/thread.h1
2 files changed, 9 insertions, 0 deletions
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;
+}
diff --git a/lib/thread.h b/lib/thread.h
index abd94ff4f0..c5f0ffbf77 100644
--- a/lib/thread.h
+++ b/lib/thread.h
@@ -273,6 +273,7 @@ extern pthread_key_t thread_current;
extern char *thread_timer_to_hhmmss(char *buf, int buf_size,
struct thread *t_timer);
+extern bool thread_is_scheduled(struct thread *thread);
/* Debug signal mask */
void debug_signals(const sigset_t *sigs);