]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.h
Prepare for V7.3.0 release.
[freertos] / FreeRTOS / Source / portable / RVDS / ARM_CM4F / portmacro.h
index e3b86b0edcc2600d2b0717fde8f8b90aec9e8bb2..cc39f85d5e1c0f64f942029ac2aa5f1cfc3663f6 100644 (file)
@@ -1,6 +1,8 @@
 /*\r
-    FreeRTOS V7.2.0 - Copyright (C) 2012 Real Time Engineers Ltd.\r
-       \r
+    FreeRTOS V7.3.0 - Copyright (C) 2012 Real Time Engineers Ltd.\r
+\r
+    FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT \r
+    http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
 \r
     ***************************************************************************\r
      *                                                                       *\r
     ***************************************************************************\r
      *                                                                       *\r
      *    Having a problem?  Start by reading the FAQ "My application does   *\r
-     *    not run, what could be wrong?                                      *\r
+     *    not run, what could be wrong?"                                     *\r
      *                                                                       *\r
      *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
      *                                                                       *\r
     ***************************************************************************\r
 \r
     \r
-    http://www.FreeRTOS.org - Documentation, training, latest information, \r
-    license and contact details.\r
+    http://www.FreeRTOS.org - Documentation, training, latest versions, license \r
+    and contact details.  \r
     \r
     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
     including FreeRTOS+Trace - an indispensable productivity tool.\r
@@ -106,43 +108,65 @@ extern "C" {
 #define portBYTE_ALIGNMENT                     8\r
 /*-----------------------------------------------------------*/        \r
 \r
-\r
 /* Scheduler utilities. */\r
 extern void vPortYield( void );\r
 extern void vPortYieldFromISR( void );\r
-\r
 #define portYIELD()                                    vPortYieldFromISR()\r
 #define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired ) vPortYieldFromISR()\r
 /*-----------------------------------------------------------*/\r
 \r
-\r
 /* Critical section management. */\r
-\r
-extern void vPortSetInterruptMask( void );\r
-extern void vPortClearInterruptMask( void );\r
+extern unsigned long ulPortSetInterruptMask( void );\r
+extern void vPortClearInterruptMask( unsigned long ulNewMask );\r
 extern void vPortEnterCritical( void );\r
 extern void vPortExitCritical( void );\r
 \r
-#define portDISABLE_INTERRUPTS()                               vPortSetInterruptMask()\r
-#define portENABLE_INTERRUPTS()                                        vPortClearInterruptMask()\r
+#define portDISABLE_INTERRUPTS()                               ulPortSetInterruptMask()\r
+#define portENABLE_INTERRUPTS()                                        vPortClearInterruptMask( 0 )\r
 #define portENTER_CRITICAL()                                   vPortEnterCritical()\r
 #define portEXIT_CRITICAL()                                            vPortExitCritical()\r
+#define portSET_INTERRUPT_MASK_FROM_ISR()              ulPortSetInterruptMask()\r
+#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x)   vPortClearInterruptMask(x)\r
 \r
-/* FAQ:  Setting BASEPRI to 0 is not a bug.  Please see \r
-http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html before disagreeing. */\r
-#define portSET_INTERRUPT_MASK_FROM_ISR()              0;vPortSetInterruptMask()\r
-#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x)   vPortClearInterruptMask();(void)x\r
+/*-----------------------------------------------------------*/\r
 \r
 /* There are an uneven number of items on the initial stack, so \r
 portALIGNMENT_ASSERT_pxCurrentTCB() will trigger false positive asserts. */\r
 #define portALIGNMENT_ASSERT_pxCurrentTCB ( void )\r
+/*-----------------------------------------------------------*/\r
 \r
+/* Tickless/low power optimisations. */\r
+extern void vPortSuppressTicksAndSleep( portTickType xExpectedIdleTime );\r
+#define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime ) vPortSuppressTicksAndSleep( xExpectedIdleTime )\r
 /*-----------------------------------------------------------*/\r
 \r
-/* Task function macros as described on the FreeRTOS.org WEB site. */\r
+/* Port specific optimisations. */\r
+#if configUSE_PORT_OPTIMISED_TASK_SELECTION == 1\r
+\r
+       /* Check the configuration. */\r
+       #if( configMAX_PRIORITIES > 32 )\r
+               #error configUSE_PORT_OPTIMISED_TASK_SELECTION can only be set to 1 when configMAX_PRIORITIES is less than or equal to 32.  It is very rare that a system requires more than 10 to 15 difference priorities as tasks that share a priority will time slice.\r
+       #endif\r
+\r
+       /* Store/clear the ready priorities in a bit map. */\r
+       #define portRECORD_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) |= ( 1UL << ( uxPriority ) )\r
+       #define portRESET_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) &= ~( 1UL << ( uxPriority ) )\r
+\r
+       /*-----------------------------------------------------------*/\r
+\r
+       #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) uxTopPriority = ( 31 - __clz( ( uxReadyPriorities ) ) )\r
+\r
+#endif /* taskRECORD_READY_PRIORITY */\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Task function macros as described on the FreeRTOS.org WEB site.  These are\r
+not necessary for to use this port.  They are defined so the common demo files\r
+(which build with all the ports) will build. */\r
 #define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )\r
 #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )\r
+/*-----------------------------------------------------------*/\r
 \r
+/* portNOP() is not required by this port. */\r
 #define portNOP()\r
 \r
 #ifdef __cplusplus\r