aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-01-11 09:32:31 -0700
committerChristian Cunningham <cc@localhost>2022-01-11 09:32:31 -0700
commit516df5812ac64d87ac2e32ebf0211534ea0abaa7 (patch)
tree2850df144c282e96dfa15a6413b3ba0a29cdf9c4 /include
parent6d4d2fe7fc4a0d2c70b64d9c232ef2758dd8bf80 (diff)
Update stuff
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)
{