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