diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-05-20 09:53:44 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2022-05-20 09:53:44 -0400 |
| commit | cfb9e0ee595385f938b62b1a67d2650c91bcc8ee (patch) | |
| tree | 0404cf43ce5eb24d68c1b44a52c2ac9baa270721 /lib/thread.h | |
| parent | c905f04c7ce7b09189999d4908c379f880b6b179 (diff) | |
lib: Make thread_is_scheduled a static inline
For performance, yo.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/thread.h')
| -rw-r--r-- | lib/thread.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/thread.h b/lib/thread.h index a2049ae52a..acdcec51de 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); |
