Add extern 'C' to FreeRTOS.h.

Remove obsolete extern declaration of vTaskSwitchContext() from the MPX430X IAR portmacro.h (other older portmacro.h header files contain the same declaration).
This commit is contained in:
Richard Barry 2014-01-17 09:45:02 +00:00
parent a1b8079df1
commit d8c135e2dc
28 changed files with 265 additions and 14208 deletions

View file

@ -66,18 +66,21 @@
#ifndef INC_FREERTOS_H
#define INC_FREERTOS_H
/*
* Include the generic headers required for the FreeRTOS port being used.
*/
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Check stdint.h was included. */
#ifndef UINT32_MAX
/* Check if the FreeRTOS stdint subset has been included. */
#ifndef FREERTOS_STDINT
#error Read the instructions in FreeRTOS/source/stdint.readme if stdint.h is not provided with your compiler.
#error Read the instructions in FreeRTOS/source/stdint.readme if stdint.h is not provided with your compiler or you are building with standard libraries excluded (for example, with -nostdint in GCC).
#endif /* FREERTOS_STDINT */
#endif /* UINT32_MAX */
@ -723,5 +726,9 @@ V8 if desired. */
#define xList List_t
#endif /* configENABLE_BACKWARD_COMPATIBILITY */
#ifdef __cplusplus
}
#endif
#endif /* INC_FREERTOS_H */

View file

@ -167,7 +167,6 @@ extern void vPortYield( void );
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
extern void vTaskSwitchContext( void );
#define portYIELD_FROM_ISR( x ) if( x ) vPortYield()
void vApplicationSetupTimerInterrupt( void );

View file

@ -129,7 +129,7 @@ typedef unsigned short UBaseType_t;
#define portENTER_CRITICAL() \
{ \
extern volatile uint16_t usCriticalNesting; \
extern volatile uint16_t usCriticalNesting; \
\
portDISABLE_INTERRUPTS(); \
\
@ -141,7 +141,7 @@ extern volatile uint16_t usCriticalNesting; \
#define portEXIT_CRITICAL() \
{ \
extern volatile uint16_t usCriticalNesting; \
extern volatile uint16_t usCriticalNesting; \
\
if( usCriticalNesting > portNO_CRITICAL_SECTION_NESTING ) \
{ \

View file

@ -137,12 +137,14 @@ void vPortExitCritical( void );
#else
/* BitScanReverse returns the bit position of the most significant '1'
in the word. */
#define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) _BitScanReverse( ( DWORD * ) &( uxTopPriority ), ( uxReadyPriorities ) )
#define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) _BitScanReverse( ( DWORD * ) &( uxTopPriority ), ( uxReadyPriorities ) )
#endif /* __GNUC__ */
#endif /* taskRECORD_READY_PRIORITY */
#ifndef __GNUC__
__pragma( warning( disable:4211 ) ) /* Nonstandard extension used, as extern is only nonstandard to MSVC. */
#endif
/* Task function macros as described on the FreeRTOS.org WEB site. */