Commit feb95c37 authored by Jeffrey Lee's avatar Jeffrey Lee Committed by ROOL
Browse files

Change OS_Exit to use TaskControl_ResetStacks

parent 90a3c342
......@@ -1370,12 +1370,12 @@ SEXIT ROUT
SWIHI OS_GenerateError ; really generate an error
ADD sp, sp, #8 ; junk SWI no and R14 on stack
Pull "r10-r12"
Pull "r10-r12" ; Try and recover caller R10-R12
BL TaskControl_ResetStacks ; R0-R3 corrupt, R13 reset
LDR r0, =ZeroPage
LDR lr, [r0, #SExitA]
STR lr, [r0, #Curr_Active_Object]
LDR r12, [r0, #SExitA_ws]
LDR sp_svc, =SVCSTK
MRS r0, CPSR
MSR CPSR_c, #I32_bit+SVC2632 ; IRQs off (to protect SPSR_svc)
BIC r0, r0, #I32_bit+F32_bit+&0F
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment