mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-10 13:45:07 -05:00
Make vPortYieldWithinAPI and FreeRTOS_Tick_Handler into more configurable functions
This commit is contained in:
parent
c1124d5707
commit
745384b04d
2 changed files with 8 additions and 6 deletions
|
|
@ -52,7 +52,6 @@ vPortYield:
|
||||||
/* After yielding to another task, resume executing the calling task */
|
/* After yielding to another task, resume executing the calling task */
|
||||||
BX LR
|
BX LR
|
||||||
|
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------------*/
|
/*-------------------------------------------------------------------------------*/
|
||||||
/* vPortSystemCallExit */
|
/* vPortSystemCallExit */
|
||||||
.align 4
|
.align 4
|
||||||
|
|
|
||||||
|
|
@ -185,10 +185,10 @@ FreeRTOS_Tick_Handler:
|
||||||
portSAVE_CONTEXT
|
portSAVE_CONTEXT
|
||||||
/* Clear interrupt flag in Real Time Interrupt. */
|
/* Clear interrupt flag in Real Time Interrupt. */
|
||||||
LDR R0, =configRTI_ADDRESS
|
LDR R0, =configRTI_ADDRESS
|
||||||
MOV R1, #1
|
LDR R1, =configRTI_CLEAR_VALUE
|
||||||
STR R1, [R0]
|
STR R1, [R0]
|
||||||
/* Increment the tick count, making any adjustments to the blocked lists
|
/* Increment the tick count, making any adjustments to the blocked lists
|
||||||
that may be necessary. */
|
* that may be necessary. */
|
||||||
BL xTaskIncrementTick
|
BL xTaskIncrementTick
|
||||||
/* If xTaskIncrementTick returned non-zero then select the next task to execute. */
|
/* If xTaskIncrementTick returned non-zero then select the next task to execute. */
|
||||||
CMP R0, #0
|
CMP R0, #0
|
||||||
|
|
@ -206,9 +206,12 @@ vPortYieldWithinAPI:
|
||||||
SUB LR, LR, #4
|
SUB LR, LR, #4
|
||||||
/* Save Currently Executing Task Context */
|
/* Save Currently Executing Task Context */
|
||||||
portSAVE_CONTEXT
|
portSAVE_CONTEXT
|
||||||
/* Clear the Interrupt Flag for vPortYieldWithinAPI */
|
/* Load the register address to clear the pending yield */
|
||||||
MOV R0, #configSSI_ADDRESS
|
LDR R0, =configCLEAR_YIELD_REG_ADDR
|
||||||
LDR R0, [R0]
|
/* Load the value needed to mark the pending yield as done */
|
||||||
|
LDR R1, =configCLEAR_YIELD_CLR_VAL
|
||||||
|
/* Write the clear value to the register */
|
||||||
|
LDR R1, [R0]
|
||||||
/* Select the next task to execute. */
|
/* Select the next task to execute. */
|
||||||
BL vTaskSwitchContext
|
BL vTaskSwitchContext
|
||||||
/* Restore the context of the task selected to execute. */
|
/* Restore the context of the task selected to execute. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue