mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-31 07:28:37 -04:00
CI-CD Updates (#768)
* Use new version of CI-CD Actions * Use cSpell spell check, and use ubuntu-20.04 for formatting check * Format and spell check all files in the portable directory * Remove the https:// from #errors and #warnings as uncrustify attempts to change it to /* * Use checkout@v3 instead of checkout@v2 on all jobs ---------
This commit is contained in:
parent
d6bccb1f4c
commit
5fb9b50da8
485 changed files with 108790 additions and 107581 deletions
15
portable/ThirdParty/GCC/Posix/port.c
vendored
15
portable/ThirdParty/GCC/Posix/port.c
vendored
|
@ -119,10 +119,10 @@ static void prvPortYieldFromISR( void );
|
|||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvFatalError( const char * pcCall,
|
||||
int iErrno ) __attribute__ ((__noreturn__));
|
||||
int iErrno ) __attribute__( ( __noreturn__ ) );
|
||||
|
||||
void prvFatalError( const char * pcCall,
|
||||
int iErrno )
|
||||
int iErrno )
|
||||
{
|
||||
fprintf( stderr, "%s: %s\n", pcCall, strerror( iErrno ) );
|
||||
abort();
|
||||
|
@ -148,11 +148,11 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
|
|||
*/
|
||||
thread = ( Thread_t * ) ( pxTopOfStack + 1 ) - 1;
|
||||
pxTopOfStack = ( StackType_t * ) thread - 1;
|
||||
ulStackSize = ( size_t )( pxTopOfStack + 1 - pxEndOfStack ) * sizeof( *pxTopOfStack );
|
||||
ulStackSize = ( size_t ) ( pxTopOfStack + 1 - pxEndOfStack ) * sizeof( *pxTopOfStack );
|
||||
|
||||
#ifdef __APPLE__
|
||||
pxEndOfStack = mach_vm_round_page ( pxEndOfStack );
|
||||
ulStackSize = mach_vm_trunc_page ( ulStackSize );
|
||||
pxEndOfStack = mach_vm_round_page( pxEndOfStack );
|
||||
ulStackSize = mach_vm_trunc_page( ulStackSize );
|
||||
#endif
|
||||
|
||||
thread->pxCode = pxCode;
|
||||
|
@ -161,6 +161,7 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
|
|||
|
||||
pthread_attr_init( &xThreadAttributes );
|
||||
iRet = pthread_attr_setstack( &xThreadAttributes, pxEndOfStack, ulStackSize );
|
||||
|
||||
if( iRet != 0 )
|
||||
{
|
||||
fprintf( stderr, "[WARN] pthread_attr_setstack failed with return value: %d. Default stack will be used.\n", iRet );
|
||||
|
@ -336,7 +337,7 @@ UBaseType_t xPortSetInterruptMask( void )
|
|||
{
|
||||
/* Interrupts are always disabled inside ISRs (signals
|
||||
* handlers). */
|
||||
return ( UBaseType_t )0;
|
||||
return ( UBaseType_t ) 0;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -352,7 +353,7 @@ static uint64_t prvGetTimeNs( void )
|
|||
|
||||
clock_gettime( CLOCK_MONOTONIC, &t );
|
||||
|
||||
return ( uint64_t )t.tv_sec * ( uint64_t )1000000000UL + ( uint64_t )t.tv_nsec;
|
||||
return ( uint64_t ) t.tv_sec * ( uint64_t ) 1000000000UL + ( uint64_t ) t.tv_nsec;
|
||||
}
|
||||
|
||||
static uint64_t prvStartTimeNs;
|
||||
|
|
79
portable/ThirdParty/GCC/Posix/portmacro.h
vendored
79
portable/ThirdParty/GCC/Posix/portmacro.h
vendored
|
@ -50,71 +50,72 @@
|
|||
*/
|
||||
|
||||
/* Type definitions. */
|
||||
#define portCHAR char
|
||||
#define portFLOAT float
|
||||
#define portDOUBLE double
|
||||
#define portLONG long
|
||||
#define portSHORT short
|
||||
#define portSTACK_TYPE unsigned long
|
||||
#define portBASE_TYPE long
|
||||
#define portPOINTER_SIZE_TYPE intptr_t
|
||||
#define portCHAR char
|
||||
#define portFLOAT float
|
||||
#define portDOUBLE double
|
||||
#define portLONG long
|
||||
#define portSHORT short
|
||||
#define portSTACK_TYPE unsigned long
|
||||
#define portBASE_TYPE long
|
||||
#define portPOINTER_SIZE_TYPE intptr_t
|
||||
|
||||
typedef portSTACK_TYPE StackType_t;
|
||||
typedef long BaseType_t;
|
||||
typedef unsigned long UBaseType_t;
|
||||
typedef portSTACK_TYPE StackType_t;
|
||||
typedef long BaseType_t;
|
||||
typedef unsigned long UBaseType_t;
|
||||
|
||||
typedef unsigned long TickType_t;
|
||||
#define portMAX_DELAY ( TickType_t ) ULONG_MAX
|
||||
typedef unsigned long TickType_t;
|
||||
#define portMAX_DELAY ( TickType_t ) ULONG_MAX
|
||||
|
||||
#define portTICK_TYPE_IS_ATOMIC 1
|
||||
#define portTICK_TYPE_IS_ATOMIC 1
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Architecture specifics. */
|
||||
#define portSTACK_GROWTH ( -1 )
|
||||
#define portHAS_STACK_OVERFLOW_CHECKING ( 1 )
|
||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||
#define portTICK_RATE_MICROSECONDS ( ( TickType_t ) 1000000 / configTICK_RATE_HZ )
|
||||
#define portBYTE_ALIGNMENT 8
|
||||
#define portSTACK_GROWTH ( -1 )
|
||||
#define portHAS_STACK_OVERFLOW_CHECKING ( 1 )
|
||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||
#define portTICK_RATE_MICROSECONDS ( ( TickType_t ) 1000000 / configTICK_RATE_HZ )
|
||||
#define portBYTE_ALIGNMENT 8
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Scheduler utilities. */
|
||||
extern void vPortYield( void );
|
||||
|
||||
#define portYIELD() vPortYield()
|
||||
#define portYIELD() vPortYield()
|
||||
|
||||
#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) vPortYield()
|
||||
#define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x )
|
||||
#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) vPortYield( )
|
||||
#define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x )
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Critical section management. */
|
||||
extern void vPortDisableInterrupts( void );
|
||||
extern void vPortEnableInterrupts( void );
|
||||
#define portSET_INTERRUPT_MASK() ( vPortDisableInterrupts() )
|
||||
#define portCLEAR_INTERRUPT_MASK() ( vPortEnableInterrupts() )
|
||||
#define portSET_INTERRUPT_MASK() ( vPortDisableInterrupts() )
|
||||
#define portCLEAR_INTERRUPT_MASK() ( vPortEnableInterrupts() )
|
||||
|
||||
extern UBaseType_t xPortSetInterruptMask( void );
|
||||
extern void vPortClearInterruptMask( UBaseType_t xMask );
|
||||
|
||||
extern void vPortEnterCritical( void );
|
||||
extern void vPortExitCritical( void );
|
||||
#define portSET_INTERRUPT_MASK_FROM_ISR() xPortSetInterruptMask()
|
||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vPortClearInterruptMask(x)
|
||||
#define portDISABLE_INTERRUPTS() portSET_INTERRUPT_MASK()
|
||||
#define portENABLE_INTERRUPTS() portCLEAR_INTERRUPT_MASK()
|
||||
#define portENTER_CRITICAL() vPortEnterCritical()
|
||||
#define portEXIT_CRITICAL() vPortExitCritical()
|
||||
#define portSET_INTERRUPT_MASK_FROM_ISR() xPortSetInterruptMask()
|
||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR( x ) vPortClearInterruptMask( x )
|
||||
#define portDISABLE_INTERRUPTS() portSET_INTERRUPT_MASK()
|
||||
#define portENABLE_INTERRUPTS() portCLEAR_INTERRUPT_MASK()
|
||||
#define portENTER_CRITICAL() vPortEnterCritical()
|
||||
#define portEXIT_CRITICAL() vPortExitCritical()
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
extern void vPortThreadDying( void *pxTaskToDelete, volatile BaseType_t *pxPendYield );
|
||||
extern void vPortCancelThread( void *pxTaskToDelete );
|
||||
#define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxPendYield ) vPortThreadDying( ( pvTaskToDelete ), ( pxPendYield ) )
|
||||
#define portCLEAN_UP_TCB( pxTCB ) vPortCancelThread( pxTCB )
|
||||
extern void vPortThreadDying( void * pxTaskToDelete,
|
||||
volatile BaseType_t * pxPendYield );
|
||||
extern void vPortCancelThread( void * pxTaskToDelete );
|
||||
#define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxPendYield ) vPortThreadDying( ( pvTaskToDelete ), ( pxPendYield ) )
|
||||
#define portCLEAN_UP_TCB( pxTCB ) vPortCancelThread( pxTCB )
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters ) __attribute__( ( noreturn ) )
|
||||
#define portTASK_FUNCTION( 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 )
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
|
@ -125,11 +126,11 @@ extern void vPortCancelThread( void *pxTaskToDelete );
|
|||
* Thus, only a compilier barrier is needed to prevent the compiler
|
||||
* reordering.
|
||||
*/
|
||||
#define portMEMORY_BARRIER() __asm volatile( "" ::: "memory" )
|
||||
#define portMEMORY_BARRIER() __asm volatile ( "" ::: "memory" )
|
||||
|
||||
extern uint32_t ulPortGetRunTime( void );
|
||||
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() /* no-op */
|
||||
#define portGET_RUN_TIME_COUNTER_VALUE() ulPortGetRunTime()
|
||||
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() /* no-op */
|
||||
#define portGET_RUN_TIME_COUNTER_VALUE() ulPortGetRunTime()
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -77,10 +77,10 @@ bool event_wait_timed( struct event * ev,
|
|||
|
||||
clock_gettime( CLOCK_REALTIME, &ts );
|
||||
ts.tv_sec += ms / 1000;
|
||||
ts.tv_nsec += ((ms % 1000) * 1000000);
|
||||
ts.tv_nsec += ( ( ms % 1000 ) * 1000000 );
|
||||
pthread_mutex_lock( &ev->mutex );
|
||||
|
||||
while( (ev->event_triggered == false) && (ret == 0) )
|
||||
while( ( ev->event_triggered == false ) && ( ret == 0 ) )
|
||||
{
|
||||
ret = pthread_cond_timedwait( &ev->cond, &ev->mutex, &ts );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue