From 958696be616aaaa4fe18fc2b886216f191bb6f9b Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Sun, 13 Feb 2022 01:54:51 -0700 Subject: Mutex Waiting Implemented Svc 4 and 5 --- include/sys/schedule.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/sys') diff --git a/include/sys/schedule.h b/include/sys/schedule.h index cb784c5..336ab4a 100644 --- a/include/sys/schedule.h +++ b/include/sys/schedule.h @@ -27,12 +27,12 @@ struct Thread { void* pc; void* sp; // Store r0-r12,lr on stack unsigned long sp_base; - void* mptr; + unsigned long cpsr; unsigned long pid; unsigned char priority; unsigned char preempt; unsigned short status; - unsigned long cpsr; + void* mptr; }; struct ThreadRotBuffer { @@ -60,10 +60,12 @@ void add_thread(void* pc, void* arg, unsigned char priority); void draw_stacks(void); void uart_scheduler(void); struct Thread* next_thread(void); -/// TODO: ENSURE IRQ/ FIQ entry switches +/// TODO: ENSURE IRQ/ FIQ entry switches /// to user mode then calls the SVC call extern void schedule(void); extern void cleanup(void); void yield(void); +void sched_mutex_yield(void* m); +void sched_mutex_resurrect(void* m); #endif -- cgit v1.2.1