aboutsummaryrefslogtreecommitdiff
path: root/src/globals.c
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-10 20:01:25 -0800
committerChristian Cunningham <cc@localhost>2022-03-10 20:01:25 -0800
commitad9e577e8b2f6431d48a6a64fd95aff432e48441 (patch)
tree598ade41d70d616cf0891855732c0957835cd465 /src/globals.c
parent0d80865f669c2314c905f94a4117300a33338792 (diff)
More Deterministic
Diffstat (limited to 'src/globals.c')
-rw-r--r--src/globals.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/globals.c b/src/globals.c
index e94580c..29760b6 100644
--- a/src/globals.c
+++ b/src/globals.c
@@ -1,6 +1,4 @@
#define GLOBALS_C
-#include <lib/kmem.h>
-#include <util/mutex.h>
#include <sys/schedule.h>
char* os_name = "Jobbed";
#ifndef VERSION
@@ -9,10 +7,7 @@ char* os_info_v = "?";
char* os_info_v = VERSION;
#endif
-__attribute__((section(".bss.kmem"))) unsigned char kmem_begin[0x2000000];
-__attribute__((section(".bss"))) unsigned char kmem_lookup[0xD000];
__attribute__((section(".bss"))) unsigned long nextpid;
-__attribute__((section(".bss"))) unsigned long sched_stack_count;
__attribute__((section(".bss"))) unsigned long stimel;
__attribute__((section(".bss"))) unsigned long stimeh;
__attribute__((section(".bss"))) struct Scheduler scheduler;
@@ -21,4 +16,10 @@ __attribute__((section(".bss"))) unsigned int gwidth;
__attribute__((section(".bss"))) unsigned int gheight;
__attribute__((section(".bss"))) unsigned int gpitch;
__attribute__((section(".bss"))) unsigned int gisrgb;
-__attribute__((section(".bss"))) unsigned char stacks_table[MAX_THREADS];
+// 0 - Free
+// 1 - Ready
+// 2 - Waiting for Mutex
+// 3 - Waiting for Signal
+// 4+ - Reserved
+__attribute__((section(".bss.threadl"))) unsigned char thread_table[MAX_THREADS];
+__attribute__((section(".bss.threads"))) struct Thread threads[MAX_THREADS];