From 91f828411617247abde3f0ace64389bb2050f794 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Sun, 13 Feb 2022 13:01:59 -0700 Subject: Unhook old mutex handles --- include/globals.h | 2 -- include/util/mutex.h | 9 +++++---- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/globals.h b/include/globals.h index 8aa337c..4304a15 100644 --- a/include/globals.h +++ b/include/globals.h @@ -10,8 +10,6 @@ extern char* os_name; extern char* os_info_v; extern unsigned char kmem_begin[0x2000000]; extern unsigned char kmem_lookup[0xD000]; -extern unsigned long exe_cnt; -extern struct Mutex exe_cnt_m; extern unsigned long nextpid; extern unsigned long stimel; extern unsigned long stimeh; diff --git a/include/util/mutex.h b/include/util/mutex.h index 524a461..907fe5b 100644 --- a/include/util/mutex.h +++ b/include/util/mutex.h @@ -2,16 +2,17 @@ #define UTIL_MUTEX_H #define NULL_PID 0 -#define SYS_PID 1 -#define SCHED_PID 2 +#define CORE0_PID 1 +#define CORE1_PID 2 +#define CORE2_PID 3 +#define CORE3_PID 4 +#define FIRST_AVAIL_PID CORE3_PID+1 struct Mutex { void* addr; unsigned long pid; } __attribute__((packed, aligned(4)));; -unsigned char lock_mutex(struct Mutex*, unsigned long); -unsigned char release_mutex(struct Mutex*, unsigned long); struct Mutex* create_mutex(void* addr); #endif -- cgit v1.2.1