aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sys/schedule.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/sys/schedule.h b/include/sys/schedule.h
index e10018c..58c7312 100644
--- a/include/sys/schedule.h
+++ b/include/sys/schedule.h
@@ -65,7 +65,14 @@ void schedule_c(void);
void schedule_irq(void);
void cleanup(void);
void sched_info(void);
-void yield(void);
+struct LL* get_next_thread(void);
+
+static inline void yield(void)
+{
+ struct Thread* t = scheduler.rthread_ll->data;
+ t->data.status = THREAD_WAITING;
+ schedule();
+}
static inline void preserve_stack(struct Thread* thread)
{