]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/GCC/ARM_CRx_No_GIC/portmacro.h
Common source code:
[freertos] / FreeRTOS / Source / portable / GCC / ARM_CRx_No_GIC / portmacro.h
index 73ec1e94f6baaad43473d1783ddb979679435a28..274dd81249a19d462de927c3f19c02308a4f6af3 100644 (file)
@@ -153,7 +153,7 @@ globally enable and disable interrupts. */
                                                                                                         "DSB           \n"             \\r
                                                                                                         "ISB             " );\r
 \r
-__attribute__( ( always_inline ) ) static __inline uint32_t portSET_INTERRUPT_MASK_FROM_ISR( void )\r
+__attribute__( ( always_inline ) ) static __inline uint32_t portINLINE_SET_INTERRUPT_MASK_FROM_ISR( void )\r
 {\r
 volatile uint32_t ulCPSR;\r
 \r
@@ -163,7 +163,8 @@ volatile uint32_t ulCPSR;
        return ulCPSR;\r
 }\r
 \r
-#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x)   if( x != 0 ) portENABLE_INTERRUPTS()\r
+#define portSET_INTERRUPT_MASK_FROM_ISR() portINLINE_SET_INTERRUPT_MASK_FROM_ISR()\r
+#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x)   if( x == 0 ) portENABLE_INTERRUPTS()\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -198,7 +199,7 @@ void vPortTaskUsesFPU( void );
 \r
        /*-----------------------------------------------------------*/\r
 \r
-       #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) uxTopPriority = ( 31UL - __builtin_clz( uxReadyPriorities ) )\r
+       #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) uxTopPriority = ( 31UL - ( uint32_t ) __builtin_clz( uxReadyPriorities ) )\r
 \r
 #endif /* configUSE_PORT_OPTIMISED_TASK_SELECTION */\r
 \r