aboutsummaryrefslogtreecommitdiff
path: root/kernel/globals.c
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-24 09:38:08 -0700
committerChristian Cunningham <cc@localhost>2022-03-24 09:38:08 -0700
commit93bf62580a68533dc8252b9a2a055c02f34ecb67 (patch)
tree1b1ca92ebbe107a998136a1442c0dba5be885e13 /kernel/globals.c
parent3e64dda5d5c350cc325650133f7e64967f1efe84 (diff)
Modularized
Diffstat (limited to 'kernel/globals.c')
-rw-r--r--kernel/globals.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/kernel/globals.c b/kernel/globals.c
new file mode 100644
index 0000000..5118e96
--- /dev/null
+++ b/kernel/globals.c
@@ -0,0 +1,24 @@
+#define GLOBALS_C
+#include <sys/schedule.h>
+#include <util/mutex.h>
+char* os_name = "Jobbed";
+#ifndef VERSION
+char* os_info_v = "?";
+#else
+char* os_info_v = VERSION;
+#endif
+
+__attribute__((section(".bss"))) unsigned long nextpid;
+__attribute__((section(".bss"))) unsigned long stimel;
+__attribute__((section(".bss"))) unsigned long stimeh;
+__attribute__((section(".bss"))) struct Scheduler scheduler;
+__attribute__((section(".bss"))) struct MutexManager mutex_manager;
+__attribute__((section(".bss"))) struct Thread usrloopthread;
+__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.mutexs"))) struct Mutex mutexs[MAX_MUTEXS];
+__attribute__((section(".bss.mutexe"))) struct Entry mutex_entries[MAX_MUTEXS];
+__attribute__((section(".bss.threads"))) struct Thread threads[MAX_THREADS];
+__attribute__((section(".bss.threade"))) struct Entry thread_entries[MAX_THREADS];