From 465a630377b97cff92ce44e9a1f32115e7d1f557 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Fri, 4 Feb 2022 23:48:40 -0700 Subject: Move to new mem --- src/sys/schedule.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sys') diff --git a/src/sys/schedule.c b/src/sys/schedule.c index 70aebb9..acd6098 100644 --- a/src/sys/schedule.c +++ b/src/sys/schedule.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include @@ -71,7 +72,8 @@ void add_thread(void* pc, void* arg, unsigned char priority) { //void* sp = get_stack(); struct RStack r = get_stack(); - struct Thread* thread = (struct Thread*)malloca(sizeof(struct Thread), 4); + //struct Thread* thread = (struct Thread*)malloca(sizeof(struct Thread), 4); + struct Thread* thread = (struct Thread*)kmalloc(sizeof(struct Thread)); thread->pc = pc; if (r.sp) { thread->sp_base = r.idx; -- cgit v1.2.1