]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1/portmacro.h
Update version number to 9.0.0rc2.
[freertos] / FreeRTOS / Source / portable / RVDS / ARM_CM7 / r0p1 / portmacro.h
index 0c5ccb97cdc6884c7f61f191fafeeda68f0e6aef..daf9cb98f87cf0348dd064e088bb8263d1ed699e 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+    FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.\r
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
@@ -178,7 +178,7 @@ extern void vPortExitCritical( void );
 \r
        /*-----------------------------------------------------------*/\r
 \r
-       #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) uxTopPriority = ( 31 - __clz( ( uxReadyPriorities ) ) )\r
+       #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) uxTopPriority = ( 31UL - ( uint32_t ) __clz( ( uxReadyPriorities ) ) )\r
 \r
 #endif /* taskRECORD_READY_PRIORITY */\r
 /*-----------------------------------------------------------*/\r
@@ -198,12 +198,12 @@ not necessary for to use this port.  They are defined so the common demo files
 /* portNOP() is not required by this port. */\r
 #define portNOP()\r
 \r
+#define portINLINE __inline\r
+\r
 #ifndef portFORCE_INLINE\r
        #define portFORCE_INLINE __forceinline\r
 #endif\r
 \r
-#define portINLINE __inline\r
-\r
 /*-----------------------------------------------------------*/\r
 \r
 static portFORCE_INLINE void vPortSetBASEPRI( uint32_t ulBASEPRI )\r
@@ -234,6 +234,18 @@ uint32_t ulNewBASEPRI = configMAX_SYSCALL_INTERRUPT_PRIORITY;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
+static portFORCE_INLINE void vPortClearBASEPRIFromISR( void )\r
+{\r
+       __asm\r
+       {\r
+               /* Set BASEPRI to 0 so no interrupts are masked.  This function is only\r
+               used to lower the mask in an interrupt, so memory barriers are not \r
+               used. */\r
+               msr basepri, #0\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
 static portFORCE_INLINE uint32_t ulPortRaiseBASEPRI( void )\r
 {\r
 uint32_t ulReturn, ulNewBASEPRI = configMAX_SYSCALL_INTERRUPT_PRIORITY;\r
@@ -254,6 +266,30 @@ uint32_t ulReturn, ulNewBASEPRI = configMAX_SYSCALL_INTERRUPT_PRIORITY;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
+static portFORCE_INLINE BaseType_t xPortIsInsideInterrupt( void )\r
+{\r
+uint32_t ulCurrentInterrupt;\r
+BaseType_t xReturn;\r
+\r
+       /* Obtain the number of the currently executing interrupt. */\r
+       __asm\r
+       {\r
+               mrs ulCurrentInterrupt, ipsr\r
+       }\r
+\r
+       if( ulCurrentInterrupt == 0 )\r
+       {\r
+               xReturn = pdFALSE;\r
+       }\r
+       else\r
+       {\r
+               xReturn = pdTRUE;\r
+       }\r
+\r
+       return xReturn;\r
+}\r
+\r
+\r
 #ifdef __cplusplus\r
 }\r
 #endif\r