diff options
author | Agustina Arzille <avarzille@riseup.net> | 2017-07-21 00:50:34 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-07-21 00:50:43 +0200 |
commit | 5c2cf8fff7a1d6dc6b88615df5433ddccbbcf51f (patch) | |
tree | 4eb919999949d471204ca8489169351f1390ccb5 /kern/thread.h | |
parent | 4278f99adcbcfbd52904c0d8809184afe091c958 (diff) |
kern/mutex: new adaptive spinning mutex implementation
Diffstat (limited to 'kern/thread.h')
-rw-r--r-- | kern/thread.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kern/thread.h b/kern/thread.h index 62708268..4d85c59d 100644 --- a/kern/thread.h +++ b/kern/thread.h @@ -724,4 +724,12 @@ thread_get_specific(unsigned int key) return thread_tsd_get(thread_self(), key); } +/* + * Return true if the given thread is running. + * + * Note that this check is speculative, and may not return an accurate + * result. It may only be used for optimistic optimizations. + */ +bool thread_is_running(const struct thread *thread); + #endif /* _KERN_THREAD_H */ |