mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-05-25 22:49:04 -04:00
* Add XMOS XCore ports Some minor modifications are also made to the kernel to support the XCore compiler's automatic stack size calculation. * Update kernel to support SMP The XMOS XCore ports are also updated to support SMP. * Fix compiler warnings in xcore ports The port set and clear interrupt mask from ISR macros were removed from the ports so that the default macros found in FreeRTOS.h are used instead. The default macros do not result in warnings when they are used. * Remove inline function from timers.h Inline function converted to macro. This should now build when optimizations are off and inlining is disabled. * Fix compiler warnings in xcore ports and tasks.c * fixed documentation for ulTaskNotifyTake() and ulTaskNotifyTakeIndexed() * spelling fixes for tasks.c Co-authored-by: Michael Bruno <mikeb@xmos.com>
35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
RSEG ICODE:CODE
|
|
CODE32
|
|
|
|
EXTERN vTaskSwitchContext
|
|
|
|
PUBLIC vPortYieldProcessor
|
|
PUBLIC vPortStartFirstTask
|
|
|
|
#include "ISR_Support.h"
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; Starting the first task is just a matter of restoring the context that
|
|
; was created by pxPortInitialiseStack().
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
vPortStartFirstTask:
|
|
portRESTORE_CONTEXT
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
; Manual context switch function. This is the SWI hander.
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
vPortYieldProcessor:
|
|
ADD LR, LR, #4 ; Add 4 to the LR to make the LR appear exactly
|
|
; as if the context was saved during and IRQ
|
|
; handler.
|
|
|
|
portSAVE_CONTEXT ; Save the context of the current task...
|
|
LDR R0, =vTaskSwitchContext ; before selecting the next task to execute.
|
|
mov lr, pc
|
|
BX R0
|
|
portRESTORE_CONTEXT ; Restore the context of the selected task.
|
|
|
|
|
|
END
|
|
|