From 73a80de4228a498b483c8e10ab317920d978d507 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Thu, 20 Jan 2022 23:22:42 -0700 Subject: Moved globals to file --- include/sys/core.h | 4 ---- include/sys/kernel.h | 8 -------- include/sys/schedule.h | 12 ------------ include/sys/timer.h | 4 ---- 4 files changed, 28 deletions(-) delete mode 100644 include/sys/kernel.h (limited to 'include/sys') diff --git a/include/sys/core.h b/include/sys/core.h index eb1f1e6..c68d8de 100644 --- a/include/sys/core.h +++ b/include/sys/core.h @@ -1,10 +1,6 @@ #ifndef SYS_CORE_H #define SYS_CORE_H -#ifndef SYS_CORE_C -extern char* os_info_v; -#endif - static inline unsigned long load32(unsigned long addr) { return *(volatile unsigned long*)addr; diff --git a/include/sys/kernel.h b/include/sys/kernel.h deleted file mode 100644 index e724513..0000000 --- a/include/sys/kernel.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SYS_KERNEL_H -#define SYS_KERNEL_H - -extern unsigned long cntfrq; -extern unsigned long cmdidx; -extern char cmd[2048]; - -#endif diff --git a/include/sys/schedule.h b/include/sys/schedule.h index 58c7312..e1cde57 100644 --- a/include/sys/schedule.h +++ b/include/sys/schedule.h @@ -53,11 +53,6 @@ struct Scheduler { struct LL tlist[PRIORITIES]; }; -#ifndef SYS_SCHEDULE_C -#define SYS_SCHEDULE_C -extern struct Scheduler scheduler; -#endif - void init_scheduler(void); void add_thread(void (*thread_fxn)(void), unsigned char priority); extern void schedule(void); @@ -67,13 +62,6 @@ void cleanup(void); void sched_info(void); struct LL* get_next_thread(void); -static inline void yield(void) -{ - struct Thread* t = scheduler.rthread_ll->data; - t->data.status = THREAD_WAITING; - schedule(); -} - static inline void preserve_stack(struct Thread* thread) { // Get current mode diff --git a/include/sys/timer.h b/include/sys/timer.h index f11fd17..7120c18 100644 --- a/include/sys/timer.h +++ b/include/sys/timer.h @@ -4,10 +4,6 @@ /// Cycles Per Second #define CPS 100 -#ifndef SYS_TIMER_C -extern struct Mutex exe_cnt_m; -#endif - void c_timer(void); #endif -- cgit v1.2.1