From 921398936d989aef06be8d869d9162e3d9b294b3 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Sun, 13 Feb 2022 13:22:43 -0700 Subject: Output the count of the task stacks --- src/sys/schedule.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sys') diff --git a/src/sys/schedule.c b/src/sys/schedule.c index 5c7a546..1643670 100644 --- a/src/sys/schedule.c +++ b/src/sys/schedule.c @@ -33,6 +33,7 @@ void init_scheduler(void) trb += 1; } } + sched_stack_count = 0; // Initialize nextpid nextpid = FIRST_AVAIL_PID; } @@ -84,6 +85,7 @@ void add_thread(void* pc, void* arg, unsigned char priority) *(unsigned long**)argp = (unsigned long*)cleanup; // Set lr to the cleanup function thread->sp = (void*)argp; thread->status = THREAD_READY; + sched_stack_count++; } else { thread->sp_base = r.idx; thread->sp = r.sp; -- cgit v1.2.1