aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sys/core.c2
-rw-r--r--src/sys/schedule.h7
-rw-r--r--src/sys/schedule.q.c5
3 files changed, 6 insertions, 8 deletions
diff --git a/src/sys/core.c b/src/sys/core.c
index 079fc78..fda4d86 100644
--- a/src/sys/core.c
+++ b/src/sys/core.c
@@ -33,8 +33,6 @@ void sysinit(void)
// Enable Timer
// As an IRQ
store32(1<<0, IRQ_BASIC_ENABLE);
- // As a FIQ
- //store32(0xC0, FIQ_CONTROL);
// Get the frequency
cntfrq = read_cntfrq();
// Clear cntv interrupt and set next 1 second timer
diff --git a/src/sys/schedule.h b/src/sys/schedule.h
index 2fd6acd..c8e938d 100644
--- a/src/sys/schedule.h
+++ b/src/sys/schedule.h
@@ -1,6 +1,12 @@
#ifndef SYS_SCHEDULE_H
#define SYS_SCHEDULE_H
+#define STACK_SIZE 0x1000
+struct TaskMemory {
+ unsigned long reg[16];
+ unsigned char stack[STACK_SIZE];
+};
+
struct Task {
unsigned char priority;
void (*task)(void);
@@ -23,7 +29,6 @@ struct Scheduler {
#endif
void add_fxn(void (*task)(void), unsigned char priority);
-void add_task(struct Task*);
unsigned int get_task_length(void);
void execute_task(void);
diff --git a/src/sys/schedule.q.c b/src/sys/schedule.q.c
index 818ba66..88488da 100644
--- a/src/sys/schedule.q.c
+++ b/src/sys/schedule.q.c
@@ -16,11 +16,6 @@ void add_fxn(void (*task)(void), unsigned char priority)
struct Task* t = (struct Task*)malloc(sizeof(struct Task));
t->priority = priority;
t->task = task;
- add_task(t);
-}
-
-void add_task(struct Task* t)
-{
pushq(scheduler.tasks, t);
}