mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Update yield code in RX600/IAR compiler port.
This commit is contained in:
parent
4f5f527c73
commit
0013028c7a
|
@ -117,10 +117,20 @@ portSTACK_TYPE and portBASE_TYPE. */
|
||||||
#define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ )
|
#define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ )
|
||||||
#define portNOP() __no_operation()
|
#define portNOP() __no_operation()
|
||||||
|
|
||||||
/* The location of the software interrupt register. Software interrupts use
|
/* Yield equivalent to "*portITU_SWINTR = 0x01; ( void ) *portITU_SWINTR;"
|
||||||
vector 27. */
|
where portITU_SWINTR is the location of the software interrupt register
|
||||||
#define portITU_SWINTR ( ( unsigned char * ) 0x000872E0 )
|
(0x000872E0). Don't rely on the assembler to select a register, so instead
|
||||||
#define portYIELD() *portITU_SWINTR = ( unsigned char ) 0x01; portNOP(); portNOP(); portNOP(); portNOP(); portNOP()
|
save and restore clobbered registers manually. */
|
||||||
|
#define portYIELD() \
|
||||||
|
__asm volatile \
|
||||||
|
( \
|
||||||
|
"PUSH.L R10 \n" \
|
||||||
|
"MOV.L #0x872E0, R10 \n" \
|
||||||
|
"MOV.B #0x1, [R10] \n" \
|
||||||
|
"MOV.L [R10], R10 \n" \
|
||||||
|
"POP R10 \n" \
|
||||||
|
)
|
||||||
|
|
||||||
#define portYIELD_FROM_ISR( x ) if( ( x ) != pdFALSE ) portYIELD()
|
#define portYIELD_FROM_ISR( x ) if( ( x ) != pdFALSE ) portYIELD()
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue