mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-01 08:54:14 -04:00
Wrap macros in do { ... } while( 0 ) (#240)
This commit is contained in:
parent
ac2c383bc1
commit
f37bcd5c14
75 changed files with 79 additions and 164 deletions
|
@ -22,7 +22,6 @@
|
|||
* https://www.FreeRTOS.org
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
#ifndef PORTMACRO_H
|
||||
|
@ -103,7 +102,7 @@ extern volatile uint16_t usCriticalNesting; \
|
|||
|
||||
/* Task utilities. */
|
||||
#define portYIELD() __asm volatile ( "BRK" )
|
||||
#define portYIELD_FROM_ISR( xHigherPriorityTaskWoken ) if( xHigherPriorityTaskWoken ) vTaskSwitchContext()
|
||||
#define portYIELD_FROM_ISR( xHigherPriorityTaskWoken ) do { if( xHigherPriorityTaskWoken ) vTaskSwitchContext(); } while( 0 )
|
||||
#define portNOP() __asm volatile ( "NOP" )
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue