Wrap macros in do { ... } while( 0 ) (#240)

This commit is contained in:
j4cbo 2021-05-24 14:41:58 -07:00 committed by GitHub
parent ac2c383bc1
commit f37bcd5c14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
75 changed files with 79 additions and 164 deletions

View file

@ -22,7 +22,6 @@
* https://www.FreeRTOS.org
* https://github.com/FreeRTOS
*
* 1 tab == 4 spaces!
*/
@ -86,7 +85,7 @@
#define portNVIC_INT_CTRL_REG ( *( ( volatile uint32_t * ) 0xe000ed04 ) )
#define portNVIC_PENDSVSET_BIT ( 1UL << 28UL )
#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) portYIELD()
#define portEND_SWITCHING_ISR( xSwitchRequired ) do { if( xSwitchRequired != pdFALSE ) portYIELD(); } while( 0 )
#define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x )
/*-----------------------------------------------------------*/