summaryrefslogtreecommitdiff
path: root/src/include/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/thread.h')
-rw-r--r--src/include/thread.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/thread.h b/src/include/thread.h
index da8ed721e3..6df9d7edc5 100644
--- a/src/include/thread.h
+++ b/src/include/thread.h
@@ -33,6 +33,10 @@ int thread_run(void (*func)(void *), void *arg);
* machine. */
int thread_run_until(void (*func)(void *), void *arg,
boot_state_t state, boot_state_sequence_t seq);
+
+/* Return 0 on successful yield, < 0 when thread did not yield. */
+int thread_yield(void);
+
/* Return 0 on successful yield for the given amount of time, < 0 when thread
* did not yield. */
int thread_yield_microseconds(unsigned int microsecs);
@@ -64,6 +68,10 @@ static inline int thread_run_until(void (*func)(void *), void *arg, boot_state_t
{
return -1;
}
+static inline int thread_yield(void)
+{
+ return -1;
+}
static inline int thread_yield_microseconds(unsigned int microsecs)
{
return -1;