mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-01 11:53:53 -04:00
Style: Add uncrustify guards, fix asm (#136)
Co-authored-by: Alfred Gedeon <gedeonag@amazon.com>
This commit is contained in:
parent
a038146915
commit
0afc048cf2
11 changed files with 142 additions and 195 deletions
|
@ -218,9 +218,7 @@ __asm void vPortSVCHandler( void )
|
|||
ldr r3, = pxCurrentTCB /* Restore the context. */
|
||||
ldr r1, [ r3 ] /* Use pxCurrentTCBConst to get the pxCurrentTCB address. */
|
||||
ldr r0, [ r1 ] /* The first item in pxCurrentTCB is the task top of stack. */
|
||||
ldmia r0 !, {
|
||||
r4 - r11
|
||||
} /* Pop the registers that are not automatically saved on exception entry and the critical nesting count. */
|
||||
ldmia r0 !, { r4 - r11 } /* Pop the registers that are not automatically saved on exception entry and the critical nesting count. */
|
||||
msr psp, r0 /* Restore the task stack pointer. */
|
||||
isb
|
||||
mov r0, # 0
|
||||
|
@ -237,7 +235,7 @@ __asm void prvStartFirstTask( void )
|
|||
PRESERVE8
|
||||
|
||||
/* Use the NVIC offset register to locate the stack. */
|
||||
ldr r0, = 0xE000ED08
|
||||
ldr r0, =0xE000ED08
|
||||
ldr r0, [ r0 ]
|
||||
ldr r0, [ r0 ]
|
||||
|
||||
|
@ -400,14 +398,10 @@ __asm void xPortPendSVHandler( void )
|
|||
ldr r3, =pxCurrentTCB /* Get the location of the current TCB. */
|
||||
ldr r2, [ r3 ]
|
||||
|
||||
stmdb r0 !, {
|
||||
r4 - r11
|
||||
} /* Save the remaining registers. */
|
||||
stmdb r0 !, { r4 - r11 } /* Save the remaining registers. */
|
||||
str r0, [ r2 ] /* Save the new top of stack into the first member of the TCB. */
|
||||
|
||||
stmdb sp !, {
|
||||
r3, r14
|
||||
}
|
||||
stmdb sp !, { r3, r14 }
|
||||
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
|
||||
msr basepri, r0
|
||||
dsb
|
||||
|
@ -415,15 +409,11 @@ __asm void xPortPendSVHandler( void )
|
|||
bl vTaskSwitchContext
|
||||
mov r0, #0
|
||||
msr basepri, r0
|
||||
ldmia sp !, {
|
||||
r3, r14
|
||||
}
|
||||
ldmia sp !, { r3, r14 }
|
||||
|
||||
ldr r1, [ r3 ]
|
||||
ldr r0, [ r1 ] /* The first item in pxCurrentTCB is the task top of stack. */
|
||||
ldmia r0 !, {
|
||||
r4 - r11
|
||||
} /* Pop the registers and the critical nesting count. */
|
||||
ldmia r0 !, { r4 - r11 } /* Pop the registers and the critical nesting count. */
|
||||
msr psp, r0
|
||||
isb
|
||||
bx r14
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue