diff --git a/portable/GCC/RX200/portmacro.h b/portable/GCC/RX200/portmacro.h index bd7781539..03cf6cbc0 100644 --- a/portable/GCC/RX200/portmacro.h +++ b/portable/GCC/RX200/portmacro.h @@ -22,6 +22,7 @@ * https://www.FreeRTOS.org * https://github.com/FreeRTOS * + * 1 tab == 4 spaces! */ @@ -95,7 +96,7 @@ save and restore clobbered registers manually. */ "POP R10 \n" \ ) -#define portYIELD_FROM_ISR( x ) do { if( x != pdFALSE ) portYIELD(); } while( 0 ) +#define portYIELD_FROM_ISR( x ) if( x != pdFALSE ) portYIELD() /* These macros should not be called directly, but through the taskENTER_CRITICAL() and taskEXIT_CRITICAL() macros. An extra check is diff --git a/portable/ThirdParty/CDK/T-HEAD_CK802/portmacro.h b/portable/ThirdParty/CDK/T-HEAD_CK802/portmacro.h index 64469a52e..6db37cc54 100644 --- a/portable/ThirdParty/CDK/T-HEAD_CK802/portmacro.h +++ b/portable/ThirdParty/CDK/T-HEAD_CK802/portmacro.h @@ -18,6 +18,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * 1 tab == 4 spaces! */ #ifndef PORTMACRO_H @@ -122,17 +123,15 @@ extern __attribute__((naked)) void cpu_yeild(void); extern portLONG ulCriticalNesting; extern portLONG pendsvflag; -#define portYIELD() do { \ - if (ulCriticalNesting == 0) \ - { \ - vPortYield(); \ - } \ - else \ - { \ - pendsvflag = 1; \ - } \ - portNOP(); portNOP(); \ - } while( 0 ) +#define portYIELD() if (ulCriticalNesting == 0) \ + { \ + vPortYield(); \ + } \ + else \ + { \ + pendsvflag = 1; \ + } \ + portNOP();portNOP() /*-----------------------------------------------------------*/ diff --git a/portable/ThirdParty/GCC/Posix/portmacro.h b/portable/ThirdParty/GCC/Posix/portmacro.h index 6902a2b22..3f96b409e 100644 --- a/portable/ThirdParty/GCC/Posix/portmacro.h +++ b/portable/ThirdParty/GCC/Posix/portmacro.h @@ -22,6 +22,7 @@ * https://www.FreeRTOS.org * https://github.com/FreeRTOS * + * 1 tab == 4 spaces! */ @@ -78,7 +79,7 @@ extern void vPortYield( void ); #define portYIELD() vPortYield() -#define portEND_SWITCHING_ISR( xSwitchRequired ) do { if( xSwitchRequired != pdFALSE ) vPortYield(); } while( 0 ) +#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) vPortYield() #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) /*-----------------------------------------------------------*/ diff --git a/portable/ThirdParty/XCC/Xtensa/portmacro.h b/portable/ThirdParty/XCC/Xtensa/portmacro.h index c3b443179..6e1ea1604 100644 --- a/portable/ThirdParty/XCC/Xtensa/portmacro.h +++ b/portable/ThirdParty/XCC/Xtensa/portmacro.h @@ -24,6 +24,7 @@ * https://www.FreeRTOS.org * https://github.com/FreeRTOS * + * 1 tab == 4 spaces! */ /* @@ -193,7 +194,7 @@ typedef struct { #if configASSERT_2 #include void exit(int); -#define configASSERT( x ) do { if (!(x)) { porttracePrint(-1); printf("\nAssertion failed in %s:%d\n", __FILE__, __LINE__); exit(-1); } } while( 0 ) +#define configASSERT( x ) if (!(x)) { porttracePrint(-1); printf("\nAssertion failed in %s:%d\n", __FILE__, __LINE__); exit(-1); } #endif