Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use portTASK_FUNCTION_PROTO to replace portNORETURN #688

Merged
merged 3 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions include/FreeRTOS.h
Original file line number Diff line number Diff line change
Expand Up @@ -895,10 +895,6 @@
#define portDONT_DISCARD
#endif

#ifndef portNORETURN
#define portNORETURN
#endif

#ifndef configUSE_TIME_SLICING
#define configUSE_TIME_SLICING 1
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#define portARCH_NAME "Cortex-M23"
#define portHAS_BASEPRI 0
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#define portARCH_NAME "Cortex-M23"
#define portHAS_BASEPRI 0
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#define portARCH_NAME "Cortex-M33"
#define portHAS_BASEPRI 1
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#define portARCH_NAME "Cortex-M33"
#define portHAS_BASEPRI 1
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#define portARCH_NAME "Cortex-M35P"
#define portHAS_BASEPRI 1
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
#define portARCH_NAME "Cortex-M55"
#define portHAS_BASEPRI 1
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
#define portARCH_NAME "Cortex-M85"
#define portHAS_BASEPRI 1
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM0/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ typedef unsigned long UBaseType_t;
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 8
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/


Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM23/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#define portARCH_NAME "Cortex-M23"
#define portHAS_BASEPRI 0
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM23_NTZ/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#define portARCH_NAME "Cortex-M23"
#define portHAS_BASEPRI 0
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM3/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 8
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* Scheduler utilities. */
Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM33/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#define portARCH_NAME "Cortex-M33"
#define portHAS_BASEPRI 1
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#define portARCH_NAME "Cortex-M33"
#define portHAS_BASEPRI 1
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM35P/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#define portARCH_NAME "Cortex-M35P"
#define portHAS_BASEPRI 1
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM35P_NTZ/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#define portARCH_NAME "Cortex-M35P"
#define portHAS_BASEPRI 1
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM3_MPU/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 8
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* SVC numbers for various services. */
Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM4F/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 8
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* Scheduler utilities. */
Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM4_MPU/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ typedef struct MPU_SETTINGS
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 8
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* SVC numbers for various services. */
Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM55/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
#define portARCH_NAME "Cortex-M55"
#define portHAS_BASEPRI 1
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM55_NTZ/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
#define portARCH_NAME "Cortex-M55"
#define portHAS_BASEPRI 1
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM7/r0p1/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 8
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* Scheduler utilities. */
Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM85/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
#define portARCH_NAME "Cortex-M85"
#define portHAS_BASEPRI 1
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
1 change: 0 additions & 1 deletion portable/GCC/ARM_CM85_NTZ/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
#define portARCH_NAME "Cortex-M85"
#define portHAS_BASEPRI 1
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* ARMv8-M common port configurations. */
Expand Down
4 changes: 1 addition & 3 deletions portable/ThirdParty/GCC/Posix/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ typedef unsigned long TickType_t;
/*-----------------------------------------------------------*/

/* Architecture specifics. */
#define portNORETURN __attribute__( ( noreturn ) )

#define portSTACK_GROWTH ( -1 )
#define portHAS_STACK_OVERFLOW_CHECKING ( 1 )
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
Expand Down Expand Up @@ -114,7 +112,7 @@ extern void vPortCancelThread( void *pxTaskToDelete );
#define portCLEAN_UP_TCB( pxTCB ) vPortCancelThread( pxTCB )
/*-----------------------------------------------------------*/

#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters ) __attribute__( ( noreturn ) )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
/*-----------------------------------------------------------*/

Expand Down
1 change: 0 additions & 1 deletion portable/ThirdParty/GCC/RP2040/include/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 8
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/* We have to use PICO_DIVIDER_DISABLE_INTERRUPTS as the source of truth rathern than our config,
* as our FreeRTOSConfig.h header cannot be included by ASM code - which is what this affects in the SDK */
#define portUSE_DIVIDER_SAVE_RESTORE !PICO_DIVIDER_DISABLE_INTERRUPTS
Expand Down
2 changes: 0 additions & 2 deletions portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,6 @@
/*-----------------------------------------------------------*/

/* Architecture specifics. */
#define portNORETURN __attribute__( ( noreturn ) )

#define portSTACK_GROWTH ( -1 )
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 4
Expand Down
4 changes: 2 additions & 2 deletions tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ static void prvInitialiseTaskLists( void ) PRIVILEGED_FUNCTION;
* void prvIdleTask( void *pvParameters );
*
*/
static portTASK_FUNCTION_PROTO( prvIdleTask, pvParameters ) portNORETURN PRIVILEGED_FUNCTION;
static portTASK_FUNCTION_PROTO( prvIdleTask, pvParameters ) PRIVILEGED_FUNCTION;

/*
* Utility to free all memory allocated by the scheduler to hold a TCB,
Expand Down Expand Up @@ -3486,7 +3486,7 @@ void vTaskMissedYield( void )
*
*/

portTASK_FUNCTION( prvIdleTask, pvParameters )
static portTASK_FUNCTION( prvIdleTask, pvParameters )
{
/* Stop warnings. */
( void ) pvParameters;
Expand Down
2 changes: 1 addition & 1 deletion timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
* task. Other tasks communicate with the timer service task using the
* xTimerQueue queue.
*/
static portTASK_FUNCTION_PROTO( prvTimerTask, pvParameters ) portNORETURN PRIVILEGED_FUNCTION;
static portTASK_FUNCTION_PROTO( prvTimerTask, pvParameters ) PRIVILEGED_FUNCTION;

/*
* Called by the timer service task to interpret and process a command it
Expand Down