Improvements to the Cortex-M ports:

- Clear the SysTick current value register before starting the SysTick (only required if something uses SysTick before starting the scheduler).
- Ensure atomic operations are thread safe by executing clrex in the context switch.
This commit is contained in:
Richard Barry 2016-06-27 13:13:05 +00:00
parent 6c975cd46a
commit c296e2cff8
23 changed files with 139 additions and 40 deletions

View file

@ -91,6 +91,7 @@ xPortPendSVHandler:
stmdb r0!, {r4-r11} /* Save the remaining registers. */
str r0, [r2] /* Save the new top of stack into the first member of the TCB. */
clrex /* Ensure thread safety of atomic operations. */
stmdb sp!, {r3, r14}
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY