mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 17:17:44 -04:00
Merge branch 'main' of github.com:n9wxu/FreeRTOS-Kernel into main
This commit is contained in:
commit
56d5942cf3
6 changed files with 56 additions and 12 deletions
6
.github/lexicon.txt
vendored
6
.github/lexicon.txt
vendored
|
@ -1529,6 +1529,7 @@ prvinitialisenewstreambuffer
|
||||||
prvinitialisenewtimer
|
prvinitialisenewtimer
|
||||||
prvinsertblockintofreelist
|
prvinsertblockintofreelist
|
||||||
prvlockqueue
|
prvlockqueue
|
||||||
|
prvnotifyqueuesetcontainer
|
||||||
prvportmalloc
|
prvportmalloc
|
||||||
prvportresetpic
|
prvportresetpic
|
||||||
prvprocesssimulatedinterrupts
|
prvprocesssimulatedinterrupts
|
||||||
|
@ -1631,7 +1632,6 @@ pvyieldevent
|
||||||
pwdtc
|
pwdtc
|
||||||
pwm
|
pwm
|
||||||
pwmc
|
pwmc
|
||||||
pxtaskcode
|
|
||||||
pxblock
|
pxblock
|
||||||
pxblocktoinsert
|
pxblocktoinsert
|
||||||
pxcallbackfunction
|
pxcallbackfunction
|
||||||
|
@ -1688,6 +1688,7 @@ pxprevious
|
||||||
pxpreviouswaketime
|
pxpreviouswaketime
|
||||||
pxqueue
|
pxqueue
|
||||||
pxqueuebuffer
|
pxqueuebuffer
|
||||||
|
pxqueuesetcontainer
|
||||||
pxramstack
|
pxramstack
|
||||||
pxreadycoroutinelists
|
pxreadycoroutinelists
|
||||||
pxreadytaskslists
|
pxreadytaskslists
|
||||||
|
@ -1707,6 +1708,7 @@ pxstreambuffercreatestatic
|
||||||
pxtagvalue
|
pxtagvalue
|
||||||
pxtask
|
pxtask
|
||||||
pxtaskbuffer
|
pxtaskbuffer
|
||||||
|
pxtaskcode
|
||||||
pxtaskdefinition
|
pxtaskdefinition
|
||||||
pxtaskstatus
|
pxtaskstatus
|
||||||
pxtaskstatusarray
|
pxtaskstatusarray
|
||||||
|
@ -2653,7 +2655,6 @@ wu
|
||||||
www
|
www
|
||||||
wwwfreertos
|
wwwfreertos
|
||||||
wxr
|
wxr
|
||||||
xtasktodelete
|
|
||||||
xa
|
xa
|
||||||
xaa
|
xaa
|
||||||
xaaaa
|
xaaaa
|
||||||
|
@ -3020,6 +3021,7 @@ xtaskswaitingforbits
|
||||||
xtaskswaitingtermination
|
xtaskswaitingtermination
|
||||||
xtaskswaitingtoreceive
|
xtaskswaitingtoreceive
|
||||||
xtaskswaitingtosend
|
xtaskswaitingtosend
|
||||||
|
xtasktodelete
|
||||||
xtasktonotify
|
xtasktonotify
|
||||||
xtasktoquery
|
xtasktoquery
|
||||||
xtasktoresume
|
xtasktoresume
|
||||||
|
|
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
|
@ -44,3 +44,4 @@ jobs:
|
||||||
- name: URL Checker
|
- name: URL Checker
|
||||||
run: |
|
run: |
|
||||||
bash kernel/.github/actions/url_verifier.sh kernel
|
bash kernel/.github/actions/url_verifier.sh kernel
|
||||||
|
|
||||||
|
|
24
.github/workflows/git-secrets.yml
vendored
Normal file
24
.github/workflows/git-secrets.yml
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
name: git-secrets Check
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
jobs:
|
||||||
|
git-secrets:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Checkout awslabs/git-secrets
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: awslabs/git-secrets
|
||||||
|
ref: master
|
||||||
|
path: git-secrets
|
||||||
|
- name: Install git-secrets
|
||||||
|
run: cd git-secrets && sudo make install && cd ..
|
||||||
|
- name: Run git-secrets
|
||||||
|
run: |
|
||||||
|
git-secrets --register-aws
|
||||||
|
git-secrets --scan
|
3
list.c
3
list.c
|
@ -158,6 +158,9 @@ void vListInsert( List_t * const pxList,
|
||||||
* 4) Using a queue or semaphore before it has been initialised or
|
* 4) Using a queue or semaphore before it has been initialised or
|
||||||
* before the scheduler has been started (are interrupts firing
|
* before the scheduler has been started (are interrupts firing
|
||||||
* before vTaskStartScheduler() has been called?).
|
* before vTaskStartScheduler() has been called?).
|
||||||
|
* 5) If the FreeRTOS port supports interrupt nesting then ensure that
|
||||||
|
* the priority of the tick interrupt is at or below
|
||||||
|
* configMAX_SYSCALL_INTERRUPT_PRIORITY.
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. *//*lint !e440 The iterator moves to a different value, not xValueOfInsertion. */
|
for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. *//*lint !e440 The iterator moves to a different value, not xValueOfInsertion. */
|
||||||
|
|
30
queue.c
30
queue.c
|
@ -342,8 +342,10 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
||||||
* variable of type StaticQueue_t or StaticSemaphore_t equals the size of
|
* variable of type StaticQueue_t or StaticSemaphore_t equals the size of
|
||||||
* the real queue and semaphore structures. */
|
* the real queue and semaphore structures. */
|
||||||
volatile size_t xSize = sizeof( StaticQueue_t );
|
volatile size_t xSize = sizeof( StaticQueue_t );
|
||||||
configASSERT( xSize == sizeof( Queue_t ) );
|
|
||||||
( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */
|
/* This assertion cannot be branch covered in unit tests */
|
||||||
|
configASSERT( xSize == sizeof( Queue_t ) ); /* LCOV_EXCL_BR_LINE */
|
||||||
|
( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */
|
||||||
}
|
}
|
||||||
#endif /* configASSERT_DEFINED */
|
#endif /* configASSERT_DEFINED */
|
||||||
|
|
||||||
|
@ -398,7 +400,7 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
||||||
configASSERT( ( uxItemSize == 0 ) || ( uxQueueLength == ( xQueueSizeInBytes / uxItemSize ) ) );
|
configASSERT( ( uxItemSize == 0 ) || ( uxQueueLength == ( xQueueSizeInBytes / uxItemSize ) ) );
|
||||||
|
|
||||||
/* Check for addition overflow. */
|
/* Check for addition overflow. */
|
||||||
configASSERT( ( sizeof( Queue_t ) + xQueueSizeInBytes ) > xQueueSizeInBytes );
|
configASSERT( ( sizeof( Queue_t ) + xQueueSizeInBytes ) > xQueueSizeInBytes );
|
||||||
|
|
||||||
/* Allocate the queue and storage area. Justification for MISRA
|
/* Allocate the queue and storage area. Justification for MISRA
|
||||||
* deviation as follows: pvPortMalloc() always ensures returned memory
|
* deviation as follows: pvPortMalloc() always ensures returned memory
|
||||||
|
@ -561,6 +563,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
||||||
TaskHandle_t pxReturn;
|
TaskHandle_t pxReturn;
|
||||||
Queue_t * const pxSemaphore = ( Queue_t * ) xSemaphore;
|
Queue_t * const pxSemaphore = ( Queue_t * ) xSemaphore;
|
||||||
|
|
||||||
|
configASSERT( xSemaphore );
|
||||||
|
|
||||||
/* This function is called by xSemaphoreGetMutexHolder(), and should not
|
/* This function is called by xSemaphoreGetMutexHolder(), and should not
|
||||||
* be called directly. Note: This is a good way of determining if the
|
* be called directly. Note: This is a good way of determining if the
|
||||||
* calling task is the mutex holder, but not a good way of determining the
|
* calling task is the mutex holder, but not a good way of determining the
|
||||||
|
@ -944,15 +948,15 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
|
||||||
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );
|
vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );
|
||||||
|
|
||||||
/* Unlocking the queue means queue events can effect the
|
/* Unlocking the queue means queue events can effect the
|
||||||
* event list. It is possible that interrupts occurring now
|
* event list. It is possible that interrupts occurring now
|
||||||
* remove this task from the event list again - but as the
|
* remove this task from the event list again - but as the
|
||||||
* scheduler is suspended the task will go onto the pending
|
* scheduler is suspended the task will go onto the pending
|
||||||
* ready last instead of the actual ready list. */
|
* ready list instead of the actual ready list. */
|
||||||
prvUnlockQueue( pxQueue );
|
prvUnlockQueue( pxQueue );
|
||||||
|
|
||||||
/* Resuming the scheduler will move tasks from the pending
|
/* Resuming the scheduler will move tasks from the pending
|
||||||
* ready list into the ready list - so it is feasible that this
|
* ready list into the ready list - so it is feasible that this
|
||||||
* task is already in a ready list before it yields - in which
|
* task is already in the ready list before it yields - in which
|
||||||
* case the yield will not cause a context switch unless there
|
* case the yield will not cause a context switch unless there
|
||||||
* is also a higher priority task in the pending ready list. */
|
* is also a higher priority task in the pending ready list. */
|
||||||
if( xTaskResumeAll() == pdFALSE )
|
if( xTaskResumeAll() == pdFALSE )
|
||||||
|
@ -1774,7 +1778,7 @@ BaseType_t xQueuePeek( QueueHandle_t xQueue,
|
||||||
taskEXIT_CRITICAL();
|
taskEXIT_CRITICAL();
|
||||||
|
|
||||||
/* Interrupts and other tasks can send to and receive from the queue
|
/* Interrupts and other tasks can send to and receive from the queue
|
||||||
* now the critical section has been exited. */
|
* now that the critical section has been exited. */
|
||||||
|
|
||||||
vTaskSuspendAll();
|
vTaskSuspendAll();
|
||||||
prvLockQueue( pxQueue );
|
prvLockQueue( pxQueue );
|
||||||
|
@ -2723,6 +2727,9 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
||||||
{
|
{
|
||||||
UBaseType_t ux;
|
UBaseType_t ux;
|
||||||
|
|
||||||
|
configASSERT( xQueue );
|
||||||
|
configASSERT( pcQueueName );
|
||||||
|
|
||||||
/* See if there is an empty space in the registry. A NULL name denotes
|
/* See if there is an empty space in the registry. A NULL name denotes
|
||||||
* a free slot. */
|
* a free slot. */
|
||||||
for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
|
for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
|
||||||
|
@ -2753,6 +2760,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
||||||
UBaseType_t ux;
|
UBaseType_t ux;
|
||||||
const char * pcReturn = NULL; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
const char * pcReturn = NULL; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||||
|
|
||||||
|
configASSERT( xQueue );
|
||||||
|
|
||||||
/* Note there is nothing here to protect against another task adding or
|
/* Note there is nothing here to protect against another task adding or
|
||||||
* removing entries from the registry while it is being searched. */
|
* removing entries from the registry while it is being searched. */
|
||||||
|
|
||||||
|
@ -2781,6 +2790,8 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
||||||
{
|
{
|
||||||
UBaseType_t ux;
|
UBaseType_t ux;
|
||||||
|
|
||||||
|
configASSERT( xQueue );
|
||||||
|
|
||||||
/* See if the handle of the queue being unregistered in actually in the
|
/* See if the handle of the queue being unregistered in actually in the
|
||||||
* registry. */
|
* registry. */
|
||||||
for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
|
for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
|
||||||
|
@ -2967,7 +2978,10 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
|
||||||
|
|
||||||
/* This function must be called form a critical section. */
|
/* This function must be called form a critical section. */
|
||||||
|
|
||||||
configASSERT( pxQueueSetContainer );
|
/* The following line is not reachable in unit tests because every call
|
||||||
|
* to prvNotifyQueueSetContainer is preceded by a check that
|
||||||
|
* pxQueueSetContainer != NULL */
|
||||||
|
configASSERT( pxQueueSetContainer ); /* LCOV_EXCL_BR_LINE */
|
||||||
configASSERT( pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength );
|
configASSERT( pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength );
|
||||||
|
|
||||||
if( pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength )
|
if( pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength )
|
||||||
|
|
4
tasks.c
4
tasks.c
|
@ -2694,8 +2694,8 @@ BaseType_t xTaskCatchUpTicks( TickType_t xTicksToCatchUp )
|
||||||
#if ( configUSE_PREEMPTION == 1 )
|
#if ( configUSE_PREEMPTION == 1 )
|
||||||
{
|
{
|
||||||
/* Preemption is on, but a context switch should only be
|
/* Preemption is on, but a context switch should only be
|
||||||
* performed if the unblocked task has a priority that is
|
* performed if the unblocked task has a priority that is
|
||||||
* equal to or higher than the currently executing task. */
|
* higher than the currently executing task. */
|
||||||
if( pxTCB->uxPriority > pxCurrentTCB->uxPriority )
|
if( pxTCB->uxPriority > pxCurrentTCB->uxPriority )
|
||||||
{
|
{
|
||||||
/* Pend the yield to be performed when the scheduler
|
/* Pend the yield to be performed when the scheduler
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue