diff options
author | Christian Cunningham <cc@localhost> | 2022-03-18 13:39:56 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-03-18 13:39:56 -0700 |
commit | 0c3837ef8fe77b0d65094f6a2cf3d7b17bcc7cbf (patch) | |
tree | aa018a9f606b7e983700d6268bb444ddaf020b5d /include/util | |
parent | 74f95c5696335b02d768815fea2940bf089d057f (diff) |
Added mutex management queues
Diffstat (limited to 'include/util')
-rw-r--r-- | include/util/mutex.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/util/mutex.h b/include/util/mutex.h index c0dd17b..8ab3235 100644 --- a/include/util/mutex.h +++ b/include/util/mutex.h @@ -1,5 +1,6 @@ #ifndef UTIL_MUTEX_H #define UTIL_MUTEX_H +#include <lib/queue.h> #define NULL_PID 0 #define CORE0_PID 1 @@ -17,6 +18,12 @@ struct Mutex { void* addr; } __attribute__((packed, aligned(4))); +struct MutexManager { + struct Queue free; + struct Queue used; +}; + +void mutex_init(void); struct Mutex* create_mutex(void* addr); unsigned char delete_mutex(struct Mutex* m); |