mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 17:17:44 -04:00
Merge branch 'master' into master
This commit is contained in:
commit
d23929ec63
8 changed files with 103 additions and 51 deletions
39
.github/CODEOWNERS
vendored
Normal file
39
.github/CODEOWNERS
vendored
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
# Each line is a file pattern followed by one or more owners.
|
||||||
|
|
||||||
|
# These owners will be the default owners for everything in
|
||||||
|
# the repo. Unless a later match takes precedence,
|
||||||
|
# @global-owner1 and @global-owner2 will be requested for
|
||||||
|
# review when someone opens a pull request.
|
||||||
|
* @FreeRTOS/pr-bar-raiser
|
||||||
|
|
||||||
|
# Order is important; the last matching pattern takes the most
|
||||||
|
# precedence. When someone opens a pull request that only
|
||||||
|
# modifies JS files, only @js-owner and not the global
|
||||||
|
# owner(s) will be requested for a review.
|
||||||
|
# *.c FreeRTOS/pr-bar-raiser
|
||||||
|
|
||||||
|
# You can also use email addresses if you prefer. They'll be
|
||||||
|
# used to look up users just like we do for commit author
|
||||||
|
# emails.
|
||||||
|
# *.go docs@example.com
|
||||||
|
|
||||||
|
# In this example, @doctocat owns any files in the build/logs
|
||||||
|
# directory at the root of the repository and any of its
|
||||||
|
# subdirectories.
|
||||||
|
# /build/logs/ @doctocat
|
||||||
|
|
||||||
|
# The `docs/*` pattern will match files like
|
||||||
|
# `docs/getting-started.md` but not further nested files like
|
||||||
|
# `docs/build-app/troubleshooting.md`.
|
||||||
|
# docs/* docs@example.com
|
||||||
|
|
||||||
|
# In this example, @octocat owns any file in an apps directory
|
||||||
|
# anywhere in your repository.
|
||||||
|
# apps/ @octocat
|
||||||
|
|
||||||
|
# In this example, @doctocat owns any file in the `/docs`
|
||||||
|
# directory in the root of your repository and any of its
|
||||||
|
# subdirectories.
|
||||||
|
# /docs/ @doctocat
|
||||||
|
|
||||||
|
|
0
CONTRIBUTING.md → .github/CONTRIBUTING.md
vendored
0
CONTRIBUTING.md → .github/CONTRIBUTING.md
vendored
0
SECURITY.md → .github/SECURITY.md
vendored
0
SECURITY.md → .github/SECURITY.md
vendored
0
lexicon.txt → .github/lexicon.txt
vendored
0
lexicon.txt → .github/lexicon.txt
vendored
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -28,7 +28,7 @@ jobs:
|
||||||
PATH=$PATH:main/tools/spell
|
PATH=$PATH:main/tools/spell
|
||||||
# Make sure that the portable directory is not included in the spellcheck.
|
# Make sure that the portable directory is not included in the spellcheck.
|
||||||
sed -i 's/find $DIRNAME/find $DIRNAME -not -path '*portable*'/g' main/tools/spell/find-unknown-comment-words
|
sed -i 's/find $DIRNAME/find $DIRNAME -not -path '*portable*'/g' main/tools/spell/find-unknown-comment-words
|
||||||
find-unknown-comment-words --directory kernel/
|
find-unknown-comment-words --directory kernel/ --lexicon ./kernel/.github/lexicon.txt
|
||||||
if [ "$?" = "0" ]; then
|
if [ "$?" = "0" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
|
|
|
@ -129,7 +129,7 @@ typedef struct xMEMORY_REGION
|
||||||
typedef struct xTASK_PARAMETERS
|
typedef struct xTASK_PARAMETERS
|
||||||
{
|
{
|
||||||
TaskFunction_t pvTaskCode;
|
TaskFunction_t pvTaskCode;
|
||||||
const char * const pcName; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
const char * pcName; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||||
configSTACK_DEPTH_TYPE usStackDepth;
|
configSTACK_DEPTH_TYPE usStackDepth;
|
||||||
void * pvParameters;
|
void * pvParameters;
|
||||||
UBaseType_t uxPriority;
|
UBaseType_t uxPriority;
|
||||||
|
|
50
portable/ThirdParty/XCC/Xtensa/port.c
vendored
50
portable/ThirdParty/XCC/Xtensa/port.c
vendored
|
@ -90,36 +90,39 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
|
||||||
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
|
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
StackType_t *sp, *tp;
|
StackType_t * sp, * tp;
|
||||||
XtExcFrame *frame;
|
XtExcFrame * frame;
|
||||||
|
|
||||||
#if XCHAL_CP_NUM > 0
|
#if XCHAL_CP_NUM > 0
|
||||||
uint32_t *p;
|
uint32_t * p;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Create interrupt stack frame aligned to 16 byte boundary */
|
/* 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 - XT_CP_SIZE - XT_STK_FRMSZ ) & ~0xf );
|
||||||
|
|
||||||
/* Clear the entire frame (do not use memset() because we don't depend on C library) */
|
/* Clear the entire frame (do not use memset() because we don't depend on C library) */
|
||||||
for (tp = sp; tp <= pxTopOfStack; ++tp)
|
for( tp = sp; tp <= pxTopOfStack; ++tp )
|
||||||
|
{
|
||||||
*tp = 0;
|
*tp = 0;
|
||||||
|
}
|
||||||
|
|
||||||
frame = (XtExcFrame *) sp;
|
frame = ( XtExcFrame * ) sp;
|
||||||
|
|
||||||
/* Explicitly initialize certain saved registers */
|
/* Explicitly initialize certain saved registers */
|
||||||
frame->pc = (UBaseType_t) pxCode; /* task entrypoint */
|
frame->pc = ( UBaseType_t ) pxCode; /* task entrypoint */
|
||||||
frame->a0 = 0; /* to terminate GDB backtrace */
|
frame->a0 = 0; /* to terminate GDB backtrace */
|
||||||
frame->a1 = (UBaseType_t) sp + XT_STK_FRMSZ; /* physical top of stack frame */
|
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->exit = ( UBaseType_t ) _xt_user_exit; /* user exception exit dispatcher */
|
||||||
|
|
||||||
/* Set initial PS to int level 0, EXCM disabled ('rfe' will enable), user mode. */
|
/* Set initial PS to int level 0, EXCM disabled ('rfe' will enable), user mode. */
|
||||||
/* Also set entry point argument parameter. */
|
/* Also set entry point argument parameter. */
|
||||||
#ifdef __XTENSA_CALL0_ABI__
|
#ifdef __XTENSA_CALL0_ABI__
|
||||||
frame->a2 = (UBaseType_t) pvParameters;
|
frame->a2 = ( UBaseType_t ) pvParameters;
|
||||||
frame->ps = PS_UM | PS_EXCM;
|
frame->ps = PS_UM | PS_EXCM;
|
||||||
#else
|
#else
|
||||||
/* + for windowed ABI also set WOE and CALLINC (pretend task was 'call4'd). */
|
/* + for windowed ABI also set WOE and CALLINC (pretend task was 'call4'd). */
|
||||||
frame->a6 = (UBaseType_t) pvParameters;
|
frame->a6 = ( UBaseType_t ) pvParameters;
|
||||||
frame->ps = PS_UM | PS_EXCM | PS_WOE | PS_CALLINC(1);
|
frame->ps = PS_UM | PS_EXCM | PS_WOE | PS_CALLINC( 1 );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XT_USE_SWPRI
|
#ifdef XT_USE_SWPRI
|
||||||
|
@ -129,13 +132,15 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px
|
||||||
|
|
||||||
#if XCHAL_CP_NUM > 0
|
#if XCHAL_CP_NUM > 0
|
||||||
/* Init the coprocessor save area (see xtensa_context.h) */
|
/* Init the coprocessor save area (see xtensa_context.h) */
|
||||||
|
|
||||||
/* No access to TCB here, so derive indirectly. Stack growth is top to bottom.
|
/* No access to TCB here, so derive indirectly. Stack growth is top to bottom.
|
||||||
* //p = (uint32_t *) xMPUSettings->coproc_area;
|
* //p = (uint32_t *) xMPUSettings->coproc_area;
|
||||||
*/
|
*/
|
||||||
p = (uint32_t *)(((uint32_t) pxTopOfStack - XT_CP_SIZE) & ~0xf);
|
p = ( uint32_t * ) ( ( ( uint32_t ) pxTopOfStack - XT_CP_SIZE ) & ~0xf );
|
||||||
p[0] = 0;
|
configASSERT( ( uint32_t ) p >= frame->a1 );
|
||||||
p[1] = 0;
|
p[ 0 ] = 0;
|
||||||
p[2] = (((uint32_t) p) + 12 + XCHAL_TOTAL_SA_ALIGN - 1) & -XCHAL_TOTAL_SA_ALIGN;
|
p[ 1 ] = 0;
|
||||||
|
p[ 2 ] = ( ( ( uint32_t ) p ) + 12 + XCHAL_TOTAL_SA_ALIGN - 1 ) & -XCHAL_TOTAL_SA_ALIGN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return sp;
|
return sp;
|
||||||
|
@ -207,16 +212,19 @@ BaseType_t xPortSysTickHandler( void )
|
||||||
* Used to set coprocessor area in stack. Current hack is to reuse MPU pointer for coprocessor area.
|
* Used to set coprocessor area in stack. Current hack is to reuse MPU pointer for coprocessor area.
|
||||||
*/
|
*/
|
||||||
#if portUSING_MPU_WRAPPERS
|
#if portUSING_MPU_WRAPPERS
|
||||||
void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, StackType_t *pxBottomOfStack, uint32_t ulStackDepth )
|
void vPortStoreTaskMPUSettings( xMPU_SETTINGS * xMPUSettings,
|
||||||
|
const struct xMEMORY_REGION * const xRegions,
|
||||||
|
StackType_t * pxBottomOfStack,
|
||||||
|
uint32_t ulStackDepth )
|
||||||
{
|
{
|
||||||
#if XCHAL_CP_NUM > 0
|
#if XCHAL_CP_NUM > 0
|
||||||
xMPUSettings->coproc_area = (StackType_t*)((((uint32_t)(pxBottomOfStack + ulStackDepth - 1)) - XT_CP_SIZE ) & ~0xf);
|
xMPUSettings->coproc_area = ( StackType_t * ) ( ( uint32_t ) ( pxBottomOfStack + ulStackDepth - 1 ));
|
||||||
|
xMPUSettings->coproc_area = ( StackType_t * ) ( ( ( portPOINTER_SIZE_TYPE ) xMPUSettings->coproc_area ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) );
|
||||||
|
xMPUSettings->coproc_area = ( Stacktype_t * ) ( ( ( uint32_t ) xMPUSettings->coproc_area - XT_CP_SIZE ) & ~0xf );
|
||||||
|
|
||||||
/* NOTE: we cannot initialize the coprocessor save area here because FreeRTOS is going to
|
/* NOTE: we cannot initialize the coprocessor save area here because FreeRTOS is going to
|
||||||
* clear the stack area after we return. This is done in pxPortInitialiseStack().
|
* clear the stack area after we return. This is done in pxPortInitialiseStack().
|
||||||
*/
|
*/
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* if portUSING_MPU_WRAPPERS */
|
||||||
|
|
||||||
|
|
5
tasks.c
5
tasks.c
|
@ -1949,6 +1949,11 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
|
||||||
if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority )
|
if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority )
|
||||||
{
|
{
|
||||||
xYieldRequired = pdTRUE;
|
xYieldRequired = pdTRUE;
|
||||||
|
|
||||||
|
/* Mark that a yield is pending in case the user is not
|
||||||
|
* using the return value to initiate a context switch
|
||||||
|
* from the ISR using portYIELD_FROM_ISR. */
|
||||||
|
xYieldPending = pdTRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue