]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/MSVC-MingW/portmacro.h
Prepare for V7.3.0 release.
[freertos] / FreeRTOS / Source / portable / MSVC-MingW / portmacro.h
index 484aac5d20e46ae44c18d786268207b740ec30e1..48ea5cf2fb269c258d00bc6799ae48e3ae2f3ae7 100644 (file)
@@ -1,6 +1,8 @@
 /*\r
-    FreeRTOS V7.2.0 - Copyright (C) 2011 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
@@ -108,6 +110,30 @@ void vPortExitCritical( void );
 #define portENTER_CRITICAL()           vPortEnterCritical()\r
 #define portEXIT_CRITICAL()                    vPortExitCritical()\r
 \r
+#ifndef __GNUC__\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
+\r
+               /* BitScanReverse returns the bit position of the most significant '1'\r
+               in the word. */\r
+               #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) _BitScanReverse( ( DWORD * ) &( uxTopPriority ), ( uxReadyPriorities ) )\r
+\r
+       #endif /* taskRECORD_READY_PRIORITY */\r
+#endif /* __GNUC__ */\r
+\r
+\r
+\r
 /* Task function macros as described on the FreeRTOS.org WEB site. */\r
 #define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void * pvParameters )\r
 #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void * pvParameters )\r