From 33e35caf1104cdf5b8e1470112677f78b5e8dc59 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Tue, 1 Feb 2022 18:39:44 -0700 Subject: Fixed cryptic error due to roffset --- src/sys/schedule.S | 4 ++++ src/sys/schedule.c | 1 + 2 files changed, 5 insertions(+) (limited to 'src/sys') diff --git a/src/sys/schedule.S b/src/sys/schedule.S index aa55ac2..dba8bd4 100644 --- a/src/sys/schedule.S +++ b/src/sys/schedule.S @@ -63,6 +63,10 @@ cleanup: bl get_rthread_roffset ldr r1, [r0, #0] add r1, #1 + cmp r1, #0x100 /* TQUEUE_MAX */ + blo 1f + mov r1, #0 +1: str r1, [r0, #0] // cleanup stack svc #3 diff --git a/src/sys/schedule.c b/src/sys/schedule.c index 0e9df78..6f2a72d 100644 --- a/src/sys/schedule.c +++ b/src/sys/schedule.c @@ -1,3 +1,4 @@ +#include #include #include #include -- cgit v1.2.1