diff options
| author | Christian Cunningham <cc@localhost> | 2022-02-13 17:13:17 -0700 | 
|---|---|---|
| committer | Christian Cunningham <cc@localhost> | 2022-02-13 17:13:17 -0700 | 
| commit | a0d6941b2ef689302dce37d1a864fd4213a0a559 (patch) | |
| tree | 10376ed4d35fb6d89a4fb0bb2cb1c4228ddb6d98 /include/util/mutex.h | |
| parent | 22b2957d4610f201bd2d365d42de285478093c01 (diff) | |
Implement generic lock
Diffstat (limited to 'include/util/mutex.h')
| -rw-r--r-- | include/util/mutex.h | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/include/util/mutex.h b/include/util/mutex.h index 907fe5b..61237b8 100644 --- a/include/util/mutex.h +++ b/include/util/mutex.h @@ -8,10 +8,12 @@  #define CORE3_PID 4  #define FIRST_AVAIL_PID CORE3_PID+1 +// PID field is first so that it can be treated +//  as a lock  struct Mutex { -	void* addr;  	unsigned long pid; -} __attribute__((packed, aligned(4)));; +	void* addr; +} __attribute__((packed, aligned(4)));  struct Mutex* create_mutex(void* addr); | 
