aboutsummaryrefslogtreecommitdiff
path: root/src/exceptions/svc.S
diff options
context:
space:
mode:
Diffstat (limited to 'src/exceptions/svc.S')
-rw-r--r--src/exceptions/svc.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/exceptions/svc.S b/src/exceptions/svc.S
index bebc417..dc1a351 100644
--- a/src/exceptions/svc.S
+++ b/src/exceptions/svc.S
@@ -45,6 +45,10 @@ svc_000003: // Clean task stack
// Free the thread after freeing the stack
mov r0, r2
bl kfree
+ ldr r3, =sched_stack_count
+ ldr r2, [r3]
+ sub r2, #1
+ str r2, [r3]
b svc_exit
svc_000004: // Lock Mutex (usr_r0 = struct Mutex*)
ldr r3, =scheduler