aboutsummaryrefslogtreecommitdiff
path: root/src/sys/schedule.S
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/sys/schedule.S
parent8b4a126ccca0694161bc3d0731f8b5c1ec66e5c8 (diff)
Supervisor Call to Add Thread
Diffstat (limited to 'src/sys/schedule.S')
-rw-r--r--src/sys/schedule.S10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sys/schedule.S b/src/sys/schedule.S
index 6b3d3e1..a47252c 100644
--- a/src/sys/schedule.S
+++ b/src/sys/schedule.S
@@ -41,3 +41,13 @@ cleanup:
kernel_usr_task_loop:
wfe
b kernel_usr_task_loop
+
+.globl add_thread
+add_thread:
+ mrs r3, cpsr
+ and r3, #0x1F
+ cmp r3, #0x10
+ beq 1f
+ b svc_add_thread
+1: svc #3
+ bx lr