aboutsummaryrefslogtreecommitdiff
path: root/src/exceptions
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-18 16:02:08 -0700
committerChristian Cunningham <cc@localhost>2022-03-18 16:02:08 -0700
commit1fbbb6f15fef8e958b57728d59d1912aeea7c7c6 (patch)
tree9d009183e882f3a85393e2356bccaeb96ed6db92 /src/exceptions
parent8b4a126ccca0694161bc3d0731f8b5c1ec66e5c8 (diff)
Supervisor Call to Add Thread
Diffstat (limited to 'src/exceptions')
-rw-r--r--src/exceptions/svc.S11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/exceptions/svc.S b/src/exceptions/svc.S
index 8494281..d14344b 100644
--- a/src/exceptions/svc.S
+++ b/src/exceptions/svc.S
@@ -27,8 +27,15 @@ svc_000001: // SYS_TIME
svc_000002: // Run Schedule
ldmfd sp!, {r0-r12,lr}
b schedule
-svc_000003: // Unused
- b svc_exit
+svc_000003: // Add Thread
+ ldr r0, [sp, #0]
+ ldr r1, [sp, #4]
+ ldr r2, [sp, #8]
+ and r2, #0xFF
+ bl svc_add_thread
+ str r0, [sp, #0]
+ ldmfd sp!, {r0-r12,lr}
+ b schedule
svc_000004: // Lock Lock (usr_r0 = struct Lock*)
ldr r3, =scheduler
ldr r2, [r3, #0] // struct Thread* rthread