diff options
author | Christian Cunningham <cc@localhost> | 2022-02-22 23:27:39 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-02-22 23:27:39 -0700 |
commit | b5021c723a5ee267982c4779bb1b1d644e4d2d5c (patch) | |
tree | 5c65cc4e784c0ee930ea255293aeb67abcf1f723 /include | |
parent | 8ffc1b0fd55aff5fa1014cd99db4dbb695d51a4c (diff) |
Started multithreading
Diffstat (limited to 'include')
-rw-r--r-- | include/macros.inc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/macros.inc b/include/macros.inc index 18573af..ea44278 100644 --- a/include/macros.inc +++ b/include/macros.inc @@ -59,3 +59,29 @@ fiq_stack_core\coreid: .space 4096 sys_stack_core\coreid: .endm + +.macro core_task coreid +__l_\@: clrex + ldr r0, =mbox_core\coreid + ldrex r1, [r0] + cmp r1, #0 + wfeeq + beq __l_\@ + clrex + mov r0, #\coreid + blx r1 + ldr r0, =mbox_core\coreid + mov r1, #0 + str r1, [r0] + b __l_\@ +.endm + +.macro assign_ctask label, coreid + ldr r0, =mbox_core\coreid + ldr r1, =\label +__l_\@: ldr r2, [r0] + cmp r2, #0 + bne __l_\@ + str r1, [r0] + sev +.endm |