aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-17 20:20:13 -0700
committerChristian Cunningham <cc@localhost>2022-03-17 20:20:13 -0700
commitfa64046e54f5af3d482d2dbcb2dcbff3458a952a (patch)
tree870a5e958603ea76ab488c25a99fa8f031f99390 /include
parentc7f1e83a4273403a7974cc412934b7d73ad3297d (diff)
Implemented semaphore
Diffstat (limited to 'include')
-rw-r--r--include/cpu.h2
-rw-r--r--include/sys/schedule.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/cpu.h b/include/cpu.h
index 9bda3e8..393fe2f 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -94,5 +94,7 @@ static inline void* getirqstack(void)
#define SYS_FREE_STACK 3
#define SYS_LOCK 4
#define SYS_UNLOCK 5
+#define SYS_SEMAPHORE_P 6
+#define SYS_SEMAPHORE_V 7
#endif
diff --git a/include/sys/schedule.h b/include/sys/schedule.h
index 12c8fec..d0d938c 100644
--- a/include/sys/schedule.h
+++ b/include/sys/schedule.h
@@ -62,6 +62,8 @@ extern void schedule(void);
extern void cleanup(void);
void yield(void);
void sched_mutex_yield(void* m);
+void sched_semaphore_yield(void* s);
void sched_mutex_resurrect(void* m);
+void sched_semaphore_resurrect(void* s);
#endif