mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-02 04:13:54 -04:00
Style: uncrustify kernel files
This commit is contained in:
parent
66a815653b
commit
587a83d647
385 changed files with 4714 additions and 4338 deletions
37
portable/ThirdParty/XCC/Xtensa/port.c
vendored
37
portable/ThirdParty/XCC/Xtensa/port.c
vendored
|
@ -23,6 +23,7 @@
|
|||
* http://www.FreeRTOS.org
|
||||
* http://aws.amazon.com/freertos
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -72,7 +73,7 @@ typedef void TCB_t;
|
|||
extern volatile TCB_t * volatile pxCurrentTCB;
|
||||
|
||||
unsigned port_xSchedulerRunning = 0; /* Duplicate of inaccessible xSchedulerRunning; needed at startup to avoid counting nesting */
|
||||
unsigned port_interruptNesting = 0; /* Interrupt nesting level */
|
||||
unsigned port_interruptNesting = 0; /* Interrupt nesting level */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -93,15 +94,15 @@ void _xt_user_exit( void );
|
|||
void * pvParameters )
|
||||
#endif
|
||||
{
|
||||
StackType_t * sp, * tp;
|
||||
XtExcFrame * frame;
|
||||
StackType_t * sp, * tp;
|
||||
XtExcFrame * frame;
|
||||
|
||||
#if XCHAL_CP_NUM > 0
|
||||
uint32_t * p;
|
||||
#endif
|
||||
|
||||
/* Create interrupt stack frame aligned to 16 byte boundary */
|
||||
sp = ( StackType_t * ) ( ( ( UBaseType_t ) ( pxTopOfStack + 1 ) - XT_CP_SIZE - XT_STK_FRMSZ ) & ~0xf );
|
||||
sp = ( StackType_t * ) ( ( ( UBaseType_t ) ( pxTopOfStack + 1 ) - XT_CP_SIZE - XT_STK_FRMSZ ) & ~0xf );
|
||||
|
||||
/* Clear the entire frame (do not use memset() because we don't depend on C library) */
|
||||
for( tp = sp; tp <= pxTopOfStack; ++tp )
|
||||
|
@ -109,23 +110,23 @@ void _xt_user_exit( void );
|
|||
*tp = 0;
|
||||
}
|
||||
|
||||
frame = ( XtExcFrame * ) sp;
|
||||
frame = ( XtExcFrame * ) sp;
|
||||
|
||||
/* Explicitly initialize certain saved registers */
|
||||
frame->pc = ( UBaseType_t ) pxCode; /* task entrypoint */
|
||||
frame->a0 = 0; /* to terminate GDB backtrace */
|
||||
frame->a1 = ( UBaseType_t ) sp + XT_STK_FRMSZ; /* physical top of stack frame */
|
||||
frame->exit = ( UBaseType_t ) _xt_user_exit; /* user exception exit dispatcher */
|
||||
frame->pc = ( UBaseType_t ) pxCode; /* task entrypoint */
|
||||
frame->a0 = 0; /* to terminate GDB backtrace */
|
||||
frame->a1 = ( UBaseType_t ) sp + XT_STK_FRMSZ; /* physical top of stack frame */
|
||||
frame->exit = ( UBaseType_t ) _xt_user_exit; /* user exception exit dispatcher */
|
||||
|
||||
/* Set initial PS to int level 0, EXCM disabled ('rfe' will enable), user mode. */
|
||||
/* Also set entry point argument parameter. */
|
||||
#ifdef __XTENSA_CALL0_ABI__
|
||||
frame->a2 = ( UBaseType_t ) pvParameters;
|
||||
frame->ps = PS_UM | PS_EXCM;
|
||||
frame->a2 = ( UBaseType_t ) pvParameters;
|
||||
frame->ps = PS_UM | PS_EXCM;
|
||||
#else
|
||||
/* + for windowed ABI also set WOE and CALLINC (pretend task was 'call4'd). */
|
||||
frame->a6 = ( UBaseType_t ) pvParameters;
|
||||
frame->ps = PS_UM | PS_EXCM | PS_WOE | PS_CALLINC( 1 );
|
||||
frame->a6 = ( UBaseType_t ) pvParameters;
|
||||
frame->ps = PS_UM | PS_EXCM | PS_WOE | PS_CALLINC( 1 );
|
||||
#endif
|
||||
|
||||
#ifdef XT_USE_SWPRI
|
||||
|
@ -139,10 +140,10 @@ void _xt_user_exit( void );
|
|||
/* No access to TCB here, so derive indirectly. Stack growth is top to bottom.
|
||||
* //p = (uint32_t *) xMPUSettings->coproc_area;
|
||||
*/
|
||||
p = ( uint32_t * ) ( ( ( uint32_t ) pxTopOfStack - XT_CP_SIZE ) & ~0xf );
|
||||
p[ 0 ] = 0;
|
||||
p[ 1 ] = 0;
|
||||
p[ 2 ] = ( ( ( uint32_t ) p ) + 12 + XCHAL_TOTAL_SA_ALIGN - 1 ) & -XCHAL_TOTAL_SA_ALIGN;
|
||||
p = ( uint32_t * ) ( ( ( uint32_t ) pxTopOfStack - XT_CP_SIZE ) & ~0xf );
|
||||
p[ 0 ] = 0;
|
||||
p[ 1 ] = 0;
|
||||
p[ 2 ] = ( ( ( uint32_t ) p ) + 12 + XCHAL_TOTAL_SA_ALIGN - 1 ) & -XCHAL_TOTAL_SA_ALIGN;
|
||||
#endif
|
||||
|
||||
return sp;
|
||||
|
@ -191,7 +192,7 @@ BaseType_t xPortStartScheduler( void )
|
|||
BaseType_t xPortSysTickHandler( void )
|
||||
{
|
||||
BaseType_t ret;
|
||||
uint32_t interruptMask;
|
||||
uint32_t interruptMask;
|
||||
|
||||
portbenchmarkIntLatency();
|
||||
|
||||
|
|
20
portable/ThirdParty/XCC/Xtensa/portclib.c
vendored
20
portable/ThirdParty/XCC/Xtensa/portclib.c
vendored
|
@ -87,18 +87,18 @@
|
|||
void * _sbrk_r( struct _reent * reent,
|
||||
int32_t incr )
|
||||
{
|
||||
extern char _end;
|
||||
extern char _heap_sentry;
|
||||
extern char _end;
|
||||
extern char _heap_sentry;
|
||||
static char * _heap_sentry_ptr = &_heap_sentry;
|
||||
static char * heap_ptr;
|
||||
char * base;
|
||||
char * base;
|
||||
|
||||
if( !heap_ptr )
|
||||
{
|
||||
heap_ptr = ( char * ) &_end;
|
||||
}
|
||||
|
||||
base = heap_ptr;
|
||||
base = heap_ptr;
|
||||
|
||||
if( heap_ptr + incr >= _heap_sentry_ptr )
|
||||
{
|
||||
|
@ -137,7 +137,7 @@
|
|||
#include "semphr.h"
|
||||
|
||||
static SemaphoreHandle_t xClibMutex;
|
||||
static uint32_t ulClibInitDone = 0;
|
||||
static uint32_t ulClibInitDone = 0;
|
||||
|
||||
/*----------------------------------------------------------------------------- */
|
||||
/* Get C library lock. */
|
||||
|
@ -189,18 +189,18 @@
|
|||
void * _sbrk_r( struct _reent * reent,
|
||||
int32_t incr )
|
||||
{
|
||||
extern char _end;
|
||||
extern char _heap_sentry;
|
||||
extern char _end;
|
||||
extern char _heap_sentry;
|
||||
static char * _heap_sentry_ptr = &_heap_sentry;
|
||||
static char * heap_ptr;
|
||||
char * base;
|
||||
char * base;
|
||||
|
||||
if( !heap_ptr )
|
||||
{
|
||||
heap_ptr = ( char * ) &_end;
|
||||
}
|
||||
|
||||
base = heap_ptr;
|
||||
base = heap_ptr;
|
||||
|
||||
if( heap_ptr + incr >= _heap_sentry_ptr )
|
||||
{
|
||||
|
@ -219,7 +219,7 @@
|
|||
{
|
||||
configASSERT( !ulClibInitDone );
|
||||
|
||||
xClibMutex = xSemaphoreCreateRecursiveMutex();
|
||||
xClibMutex = xSemaphoreCreateRecursiveMutex();
|
||||
ulClibInitDone = 1;
|
||||
}
|
||||
|
||||
|
|
3
portable/ThirdParty/XCC/Xtensa/portmacro.h
vendored
3
portable/ThirdParty/XCC/Xtensa/portmacro.h
vendored
|
@ -23,6 +23,7 @@
|
|||
* http://www.FreeRTOS.org
|
||||
* http://aws.amazon.com/freertos
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -225,7 +226,7 @@
|
|||
static inline void vPortCleanUpTcbClib( struct _reent * ptr )
|
||||
{
|
||||
FILE * fp = &( ptr->__sf[ 0 ] );
|
||||
int i;
|
||||
int i;
|
||||
|
||||
for( i = 0; i < 3; ++i, ++fp )
|
||||
{
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
#if defined( _ASMLANGUAGE ) || defined( __ASSEMBLER__ )
|
||||
|
||||
#define STRUCT_BEGIN .pushsection.text; .struct 0
|
||||
#define STRUCT_FIELD( ctype, size, asname, name ) asname:.space size
|
||||
#define STRUCT_FIELD( ctype, size, asname, name ) asname:.space size
|
||||
#define STRUCT_AFIELD( ctype, size, asname, name, n ) asname:.space( size ) *( n )
|
||||
#define STRUCT_END( sname ) sname ## Size:; .popsection
|
||||
|
||||
|
@ -337,8 +337,8 @@ STRUCT_END( XtSolFrame )
|
|||
.endm
|
||||
#define ENTRY0
|
||||
#define RET( sz ) ret1 sz
|
||||
.macro ret1 size = 0x10
|
||||
l32i a0, sp, 0
|
||||
.macro ret1 size = 0x10
|
||||
l32i a0, sp, 0
|
||||
addi sp, sp, \ size
|
||||
ret
|
||||
.endm
|
||||
|
|
2
portable/ThirdParty/XCC/Xtensa/xtensa_init.c
vendored
2
portable/ThirdParty/XCC/Xtensa/xtensa_init.c
vendored
|
@ -47,7 +47,7 @@
|
|||
void _xt_tick_divisor_init( void )
|
||||
{
|
||||
#ifdef XT_CLOCK_FREQ
|
||||
_xt_tick_divisor = ( XT_CLOCK_FREQ / XT_TICK_PER_SEC );
|
||||
_xt_tick_divisor = ( XT_CLOCK_FREQ / XT_TICK_PER_SEC );
|
||||
#else
|
||||
#ifdef XT_BOARD
|
||||
_xt_tick_divisor = xtbsp_clock_freq_hz() / XT_TICK_PER_SEC;
|
||||
|
|
8
portable/ThirdParty/XCC/Xtensa/xtensa_intr.c
vendored
8
portable/ThirdParty/XCC/Xtensa/xtensa_intr.c
vendored
|
@ -113,7 +113,7 @@
|
|||
void * arg )
|
||||
{
|
||||
xt_handler_table_entry * entry;
|
||||
xt_handler old;
|
||||
xt_handler old;
|
||||
|
||||
if( ( n < 0 ) || ( n >= XCHAL_NUM_INTERRUPTS ) )
|
||||
{
|
||||
|
@ -126,17 +126,17 @@
|
|||
}
|
||||
|
||||
entry = _xt_interrupt_table + n;
|
||||
old = entry->handler;
|
||||
old = entry->handler;
|
||||
|
||||
if( f )
|
||||
{
|
||||
entry->handler = f;
|
||||
entry->arg = arg;
|
||||
entry->arg = arg;
|
||||
}
|
||||
else
|
||||
{
|
||||
entry->handler = &xt_unhandled_interrupt;
|
||||
entry->arg = ( void * ) n;
|
||||
entry->arg = ( void * ) n;
|
||||
}
|
||||
|
||||
return( ( old == &xt_unhandled_interrupt ) ? 0 : old );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue