From 757fed2ff42abbc120e9af76b3f913168ae2c402 Mon Sep 17 00:00:00 2001 From: David Chalco Date: Wed, 10 Jun 2020 12:13:41 -0700 Subject: [PATCH] Defer/Remove kernel source changes --- event_groups.c | 4 ++-- include/FreeRTOS.h | 4 ---- portable/ThirdParty/XMOS_XCC/XCORE200/portmacro.h | 9 --------- timers.c | 9 +++------ 4 files changed, 5 insertions(+), 21 deletions(-) diff --git a/event_groups.c b/event_groups.c index 1567bf3e1..0bf3b9661 100644 --- a/event_groups.c +++ b/event_groups.c @@ -654,7 +654,7 @@ const List_t *pxTasksWaitingForBits = &( pxEventBits->xTasksWaitingForBits ); /* For internal use only - execute a 'set bits' command that was pended from an interrupt. */ -portTIMER_CALLBACK_ATTRIBUTE void vEventGroupSetBitsCallback( void *pvEventGroup, const uint32_t ulBitsToSet ) +void vEventGroupSetBitsCallback( void *pvEventGroup, const uint32_t ulBitsToSet ) { ( void ) xEventGroupSetBits( pvEventGroup, ( EventBits_t ) ulBitsToSet ); /*lint !e9079 Can't avoid cast to void* as a generic timer callback prototype. Callback casts back to original type so safe. */ } @@ -662,7 +662,7 @@ portTIMER_CALLBACK_ATTRIBUTE void vEventGroupSetBitsCallback( void *pvEventGroup /* For internal use only - execute a 'clear bits' command that was pended from an interrupt. */ -portTIMER_CALLBACK_ATTRIBUTE void vEventGroupClearBitsCallback( void *pvEventGroup, const uint32_t ulBitsToClear ) +void vEventGroupClearBitsCallback( void *pvEventGroup, const uint32_t ulBitsToClear ) { ( void ) xEventGroupClearBits( pvEventGroup, ( EventBits_t ) ulBitsToClear ); /*lint !e9079 Can't avoid cast to void* as a generic timer callback prototype. Callback casts back to original type so safe. */ } diff --git a/include/FreeRTOS.h b/include/FreeRTOS.h index 77ab69c70..75e2855f7 100644 --- a/include/FreeRTOS.h +++ b/include/FreeRTOS.h @@ -276,10 +276,6 @@ hold explicit before calling the code. */ #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_STACK_DEPTH must also be defined. #endif /* configTIMER_TASK_STACK_DEPTH */ - #ifndef portTIMER_CALLBACK_ATTRIBUTE - #define portTIMER_CALLBACK_ATTRIBUTE - #endif /* portTIMER_CALLBACK_ATTRIBUTE */ - #endif /* configUSE_TIMERS */ #ifndef portSET_INTERRUPT_MASK_FROM_ISR diff --git a/portable/ThirdParty/XMOS_XCC/XCORE200/portmacro.h b/portable/ThirdParty/XMOS_XCC/XCORE200/portmacro.h index bdebee0f1..21b32354b 100644 --- a/portable/ThirdParty/XMOS_XCC/XCORE200/portmacro.h +++ b/portable/ThirdParty/XMOS_XCC/XCORE200/portmacro.h @@ -167,15 +167,6 @@ int xscope_gettime( void ); #define snprintf(...) rtos_snprintf(__VA_ARGS__) #endif -/* Attribute for the pxCallbackFunction member of the Timer_t struct. -Required by xcc to calculate stack usage. */ -#define portTIMER_CALLBACK_ATTRIBUTE __attribute__((fptrgroup("timerCallbackGroup"))) - -/* Timer callback function macros. For xcc this ensures they get added to the timer callback -group so that stack usage for certain functions in timers.c can be calculated. */ -#define portTIMER_CALLBACK_FUNCTION_PROTO( vFunction, xTimer ) void vFunction( TimerHandle_t xTimer ) -#define portTIMER_CALLBACK_FUNCTION( vFunction, xTimer ) portTIMER_CALLBACK_ATTRIBUTE void vFunction( TimerHandle_t xTimer ) - /*-----------------------------------------------------------*/ /* Task function macros as described on the FreeRTOS.org WEB site. These are diff --git a/timers.c b/timers.c index ee9c59b02..d10c83208 100644 --- a/timers.c +++ b/timers.c @@ -69,17 +69,14 @@ defining trmTIMER_SERVICE_TASK_NAME in FreeRTOSConfig.h. */ #define tmrSTATUS_IS_STATICALLY_ALLOCATED ( ( uint8_t ) 0x02 ) #define tmrSTATUS_IS_AUTORELOAD ( ( uint8_t ) 0x04 ) -/* The definition of the timers themselves. -portTIMER_CALLBACK_ATTRIBUTE can be used to apply an __attribute__ to timer callbacks and timer -callback function pointers. In some ports, this attribute enables the compiler to resolve function pointers in static analysis. -portTIMER_CALLBACK_ATTRIBUTE defaults as white space unless it is defined by the user. */ +/* The definition of the timers themselves. */ typedef struct tmrTimerControl /* The old naming convention is used to prevent breaking kernel aware debuggers. */ { const char *pcTimerName; /*<< Text name. This is not used by the kernel, it is included simply to make debugging easier. */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ ListItem_t xTimerListItem; /*<< Standard linked list item as used by all kernel features for event management. */ TickType_t xTimerPeriodInTicks;/*<< How quickly and often the timer expires. */ void *pvTimerID; /*<< An ID to identify the timer. This allows the timer to be identified when the same callback is used for multiple timers. */ - portTIMER_CALLBACK_ATTRIBUTE TimerCallbackFunction_t pxCallbackFunction; /*<< The function that will be called when the timer expires. */ + TimerCallbackFunction_t pxCallbackFunction; /*<< The function that will be called when the timer expires. */ #if( configUSE_TRACE_FACILITY == 1 ) UBaseType_t uxTimerNumber; /*<< An ID assigned by trace tools such as FreeRTOS+Trace */ #endif @@ -104,7 +101,7 @@ typedef struct tmrTimerParameters typedef struct tmrCallbackParameters { - portTIMER_CALLBACK_ATTRIBUTE PendedFunction_t pxCallbackFunction; /* << The callback function to execute. */ + PendedFunction_t pxCallbackFunction; /* << The callback function to execute. */ void *pvParameter1; /* << The value that will be used as the callback functions first parameter. */ uint32_t ulParameter2; /* << The value that will be used as the callback functions second parameter. */ } CallbackParameters_t;