/*\r
- FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+ FreeRTOS V9.0.0rc1 - 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
\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
/* 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
}\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
}\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