aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-17 20:45:17 -0700
committerChristian Cunningham <cc@localhost>2022-03-17 20:45:17 -0700
commitade8ce64cf42471d2b85dc3ada77f91d41415798 (patch)
tree8920d271b14d3b0d04263f3293d9d4e7f12aff4d
parentcfb195c2c02db258b82414b7e10fd89dc12f1b18 (diff)
Fixed conditionals
-rw-r--r--src/exceptions/svc.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/exceptions/svc.S b/src/exceptions/svc.S
index a95c7a6..ee083ca 100644
--- a/src/exceptions/svc.S
+++ b/src/exceptions/svc.S
@@ -78,7 +78,7 @@ svc_000006: // Semaphore decrease
cmp r2, #0
beq svc_000006_delay_semaphore
sub r1, r2, #1
- strexeq r2, r1, [r0, #0]
+ strex r2, r1, [r0, #0]
teq r2, #0
bne 1b
dmb
@@ -88,6 +88,7 @@ svc_000006_delay_semaphore:
ldmfd sp!, {r0-r12,lr}
sub lr, #4
b schedule
+ b svc_exit
svc_000007: // Semaphore increase
ldr r0, [sp, #0] // struct Semaphore* s
1: clrex
@@ -98,6 +99,8 @@ svc_000007: // Semaphore increase
bne 1b
dmb
bl sched_semaphore_resurrect
+ ldmfd sp!, {r0-r12,lr}
+ b schedule
b svc_exit
svc_exit:
ldmfd sp!, {r0-r12,pc}^