]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/MSVC-MingW/portmacro.h
Prepare for V9.0.0 release:
[freertos] / FreeRTOS / Source / portable / MSVC-MingW / portmacro.h
index 7f6548193e6391135a32bba5a8dce39abb5e5957..34634fd2e995d18c7bd1b973c9d5763fcb5a9ffd 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+    FreeRTOS V9.0.0 - 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
@@ -8,14 +8,14 @@
 \r
     FreeRTOS is free software; you can redistribute it and/or modify it under\r
     the terms of the GNU General Public License (version 2) as published by the\r
-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+    Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.\r
 \r
-       ***************************************************************************\r
+    ***************************************************************************\r
     >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
     >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
     >>!   obliged to provide the source code for proprietary components     !<<\r
     >>!   outside of the FreeRTOS kernel.                                   !<<\r
-       ***************************************************************************\r
+    ***************************************************************************\r
 \r
     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
     ***************************************************************************\r
 \r
     http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
-       the FAQ page "My application does not run, what could be wrong?".  Have you\r
-       defined configASSERT()?\r
+    the FAQ page "My application does not run, what could be wrong?".  Have you\r
+    defined configASSERT()?\r
 \r
-       http://www.FreeRTOS.org/support - In return for receiving this top quality\r
-       embedded software for free we request you assist our global community by\r
-       participating in the support forum.\r
+    http://www.FreeRTOS.org/support - In return for receiving this top quality\r
+    embedded software for free we request you assist our global community by\r
+    participating in the support forum.\r
 \r
-       http://www.FreeRTOS.org/training - Investing in training allows your team to\r
-       be as productive as possible as early as possible.  Now you can receive\r
-       FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
-       Ltd, and the world's leading authority on the world's leading RTOS.\r
+    http://www.FreeRTOS.org/training - Investing in training allows your team to\r
+    be as productive as possible as early as possible.  Now you can receive\r
+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
+    Ltd, and the world's leading authority on the world's leading RTOS.\r
 \r
     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
     including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
@@ -105,7 +105,7 @@ typedef unsigned long UBaseType_t;
 /* Hardware specifics. */\r
 #define portSTACK_GROWTH                       ( -1 )\r
 #define portTICK_PERIOD_MS                     ( ( TickType_t ) 1000 / configTICK_RATE_HZ )\r
-\r
+#define portINLINE __inline\r
 \r
 #if defined( __x86_64__) || defined( _M_X64 )\r
        #define portBYTE_ALIGNMENT              8\r
@@ -115,6 +115,11 @@ typedef unsigned long UBaseType_t;
 \r
 #define portYIELD()                                    vPortGenerateSimulatedInterrupt( portINTERRUPT_YIELD )\r
 \r
+/* Simulated interrupts return pdFALSE if no context switch should be performed,\r
+or a non-zero number if a context switch should be performed. */\r
+#define portYIELD_FROM_ISR( x ) return x\r
+#define portEND_SWITCHING_ISR( x ) portYIELD_FROM_ISR( ( x ) )\r
+\r
 void vPortCloseRunningThread( void *pvTaskToDelete, volatile BaseType_t *pxPendYield );\r
 void vPortDeleteThread( void *pvThreadToDelete );\r
 #define portCLEAN_UP_TCB( pxTCB )      vPortDeleteThread( pxTCB )\r
@@ -148,11 +153,9 @@ void vPortExitCritical( void );
        /*-----------------------------------------------------------*/\r
 \r
        #ifdef __GNUC__\r
-               #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities )      \\r
-                       __asm volatile( "mov %0, %%eax                                                                  \n\t" \\r
-                                                       "bsr %%eax, %%eax                                                               \n\t" \\r
-                                                       "mov %%eax, %1                                                                  \n\t" \\r
-                                                       :"=r"(uxTopPriority) : "r"(uxReadyPriorities) : "eax" )\r
+               #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities )    \\r
+                       __asm volatile( "bsr %1, %0\n\t"                                                                        \\r
+                                                       :"=r"(uxTopPriority) : "rm"(uxReadyPriorities) : "cc" )\r
        #else\r
                /* BitScanReverse returns the bit position of the most significant '1'\r
                in the word. */\r
@@ -170,7 +173,6 @@ void vPortExitCritical( void );
 #define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void * pvParameters )\r
 #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void * pvParameters )\r
 \r
-\r
 #define portINTERRUPT_YIELD                            ( 0UL )\r
 #define portINTERRUPT_TICK                             ( 1UL )\r
 \r