mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 01:58:32 -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
|
||||
|
@ -80,7 +79,7 @@ typedef unsigned long UBaseType_t;
|
|||
|
||||
extern void vTaskSwitchContext( void );
|
||||
#define portYIELD() asm volatile ( "trap" );
|
||||
#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired ) vTaskSwitchContext()
|
||||
#define portEND_SWITCHING_ISR( xSwitchRequired ) do { if( xSwitchRequired ) vTaskSwitchContext(); } while( 0 )
|
||||
|
||||
|
||||
/* Include the port_asm.S file where the Context saving/restoring is defined. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue