summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/thread.c8
-rw-r--r--lib/thread.h9
2 files changed, 8 insertions, 9 deletions
diff --git a/lib/thread.c b/lib/thread.c
index 44183257b..fd79503cc 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -2143,14 +2143,6 @@ 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;
-}
-
static ssize_t printfrr_thread_dbg(struct fbuf *buf, struct printfrr_eargs *ea,
const struct thread *thread)
{
diff --git a/lib/thread.h b/lib/thread.h
index a2049ae52..acdcec51d 100644
--- a/lib/thread.h
+++ b/lib/thread.h
@@ -283,7 +283,14 @@ 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);
+static inline bool thread_is_scheduled(struct thread *thread)
+{
+ if (thread)
+ return true;
+
+ return false;
+}
+
/* Debug signal mask */
void debug_signals(const sigset_t *sigs);