mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-09 23:57:49 -04:00
Merge 19e901e3e8
into 9736947af2
This commit is contained in:
commit
12df28e4ea
4 changed files with 159 additions and 16 deletions
|
@ -764,6 +764,13 @@
|
||||||
#define traceCREATE_COUNTING_SEMAPHORE()
|
#define traceCREATE_COUNTING_SEMAPHORE()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceCREATE_COUNTING_SEMAPHORE_EXT
|
||||||
|
|
||||||
|
/* Extended version of traceCREATE_COUNTING_SEMAPHORE that also exposes the queue
|
||||||
|
* handle after the initial count has been set */
|
||||||
|
#define traceCREATE_COUNTING_SEMAPHORE_EXT( xHandle ) traceCREATE_COUNTING_SEMAPHORE()
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED
|
#ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED
|
||||||
#define traceCREATE_COUNTING_SEMAPHORE_FAILED()
|
#define traceCREATE_COUNTING_SEMAPHORE_FAILED()
|
||||||
#endif
|
#endif
|
||||||
|
@ -776,10 +783,24 @@
|
||||||
#define traceQUEUE_SEND( pxQueue )
|
#define traceQUEUE_SEND( pxQueue )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceQUEUE_SEND_EXT
|
||||||
|
|
||||||
|
/* Extended version of traceQUEUE_SEND that also reports the copy position
|
||||||
|
* of the sent data. */
|
||||||
|
#define traceQUEUE_SEND_EXT( pxQueue, xCopyPosition ) traceQUEUE_SEND( pxQueue )
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef traceQUEUE_SEND_FAILED
|
#ifndef traceQUEUE_SEND_FAILED
|
||||||
#define traceQUEUE_SEND_FAILED( pxQueue )
|
#define traceQUEUE_SEND_FAILED( pxQueue )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceQUEUE_SEND_FAILED_EXT
|
||||||
|
|
||||||
|
/* Extended version of traceQUEUE_SEND_FAILED that also reports the requested
|
||||||
|
* copy position of the sent data. */
|
||||||
|
#define traceQUEUE_SEND_FAILED_EXT( pxQueue, xCopyPosition ) traceQUEUE_SEND_FAILED( pxQueue )
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef traceQUEUE_RECEIVE
|
#ifndef traceQUEUE_RECEIVE
|
||||||
#define traceQUEUE_RECEIVE( pxQueue )
|
#define traceQUEUE_RECEIVE( pxQueue )
|
||||||
#endif
|
#endif
|
||||||
|
@ -804,10 +825,24 @@
|
||||||
#define traceQUEUE_SEND_FROM_ISR( pxQueue )
|
#define traceQUEUE_SEND_FROM_ISR( pxQueue )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceQUEUE_SEND_FROM_ISR_EXT
|
||||||
|
|
||||||
|
/* Extended version of traceQUEUE_SEND_FROM_ISR that also reports the copy
|
||||||
|
* position of the sent data. */
|
||||||
|
#define traceQUEUE_SEND_FROM_ISR_EXT( pxQueue, xCopyPosition ) traceQUEUE_SEND_FROM_ISR( pxQueue )
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef traceQUEUE_SEND_FROM_ISR_FAILED
|
#ifndef traceQUEUE_SEND_FROM_ISR_FAILED
|
||||||
#define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
|
#define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceQUEUE_SEND_FROM_ISR_FAILED_EXT
|
||||||
|
|
||||||
|
/* Extended version of traceQUEUE_SEND_FROM_ISR_FAILED that also reports the requested
|
||||||
|
* copy position of the sent data. */
|
||||||
|
#define traceQUEUE_SEND_FROM_ISR_FAILED_EXT( pxQueue, xCopyPosition ) traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef traceQUEUE_RECEIVE_FROM_ISR
|
#ifndef traceQUEUE_RECEIVE_FROM_ISR
|
||||||
#define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )
|
#define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )
|
||||||
#endif
|
#endif
|
||||||
|
@ -820,6 +855,14 @@
|
||||||
#define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue )
|
#define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceQUEUE_RESET
|
||||||
|
#define traceQUEUE_RESET( pxQueue, xNewQueue )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceQUEUE_RESET_FAILED
|
||||||
|
#define traceQUEUE_RESET_FAILED( pxQueue, xNewQueue )
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef traceQUEUE_DELETE
|
#ifndef traceQUEUE_DELETE
|
||||||
#define traceQUEUE_DELETE( pxQueue )
|
#define traceQUEUE_DELETE( pxQueue )
|
||||||
#endif
|
#endif
|
||||||
|
@ -837,13 +880,20 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef traceTASK_DELAY_UNTIL
|
#ifndef traceTASK_DELAY_UNTIL
|
||||||
#define traceTASK_DELAY_UNTIL( x )
|
#define traceTASK_DELAY_UNTIL( xTimeToWake )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef traceTASK_DELAY
|
#ifndef traceTASK_DELAY
|
||||||
#define traceTASK_DELAY()
|
#define traceTASK_DELAY()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceTASK_DELAY_EXT
|
||||||
|
|
||||||
|
/* Extended version of traceTASK_DELAY that also exposes the number of ticks
|
||||||
|
* to delay for. */
|
||||||
|
#define traceTASK_DELAY_EXT( xTicksToDelay ) traceTASK_DELAY()
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef traceTASK_PRIORITY_SET
|
#ifndef traceTASK_PRIORITY_SET
|
||||||
#define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
|
#define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
|
||||||
#endif
|
#endif
|
||||||
|
@ -956,6 +1006,23 @@
|
||||||
#define traceTASK_NOTIFY_TAKE( uxIndexToWait )
|
#define traceTASK_NOTIFY_TAKE( uxIndexToWait )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceTASK_NOTIFY_TAKE_EXT
|
||||||
|
|
||||||
|
/* Extended version of traceTASK_NOTIFY_TAKE that also exposes value of
|
||||||
|
* xClearCountOnExit, informing the tracer of the state of this task
|
||||||
|
* notification after it has been taken. Note that this hook, unlike traceTASK_NOTIFY_TAKE,
|
||||||
|
* is only called if the notification was successfully taken. */
|
||||||
|
#define traceTASK_NOTIFY_TAKE_EXT( uxIndexToWait, xClearCountOnExit ) traceTASK_NOTIFY_TAKE( uxIndexToWait )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceTASK_NOTIFY_TAKE_FAILED
|
||||||
|
|
||||||
|
/* Task notification take failed. For backwards-compatability, this macro falls
|
||||||
|
* back on traceTASK_NOTIFY_TAKE which was always called, no matter if
|
||||||
|
* successfull or not. */
|
||||||
|
#define traceTASK_NOTIFY_TAKE_FAILED( uxIndexToWait ) traceTASK_NOTIFY_TAKE( uxIndexToWait )
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef traceTASK_NOTIFY_WAIT_BLOCK
|
#ifndef traceTASK_NOTIFY_WAIT_BLOCK
|
||||||
#define traceTASK_NOTIFY_WAIT_BLOCK( uxIndexToWait )
|
#define traceTASK_NOTIFY_WAIT_BLOCK( uxIndexToWait )
|
||||||
#endif
|
#endif
|
||||||
|
@ -964,18 +1031,66 @@
|
||||||
#define traceTASK_NOTIFY_WAIT( uxIndexToWait )
|
#define traceTASK_NOTIFY_WAIT( uxIndexToWait )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceTASK_NOTIFY_WAIT_EXT
|
||||||
|
|
||||||
|
/* Extended version of traceTASK_NOTIFY_WAIT that also exposes value of
|
||||||
|
* ulBitsToClearOnExit, informing the tracer of the state of this task
|
||||||
|
* notification after it has been taken. Note that this hook, unlike
|
||||||
|
* traceTASK_NOTIFY_WAIT, is only called if the notification was successfully
|
||||||
|
* taken. */
|
||||||
|
#define traceTASK_NOTIFY_WAIT_EXT( uxIndexToWait, ulBitsToClearOnExit ) traceTASK_NOTIFY_WAIT( uxIndexToWait )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceTASK_NOTIFY_WAIT_FAILED
|
||||||
|
|
||||||
|
/* Task notification wait failed. For backwards-compatability, this macro falls
|
||||||
|
* back on traceTASK_NOTIFY_WAIT which was always called, no matter if
|
||||||
|
* successfull or not. */
|
||||||
|
#define traceTASK_NOTIFY_WAIT_FAILED( uxIndexToWait ) traceTASK_NOTIFY_WAIT( uxIndexToWait )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef traceTASK_NOTIFY
|
#ifndef traceTASK_NOTIFY
|
||||||
#define traceTASK_NOTIFY( uxIndexToNotify )
|
#define traceTASK_NOTIFY( uxIndexToNotify )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceTASK_NOTIFY_EXT
|
||||||
|
|
||||||
|
/* Extended version of traceTASK_NOTIFY that also exposes the task being
|
||||||
|
* notified, and if/how the notification value was modified. */
|
||||||
|
#define traceTASK_NOTIFY_EXT( pxTCB, uxIndexToNotify, eAction, xReturn ) traceTASK_NOTIFY( uxIndexToNotify )
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef traceTASK_NOTIFY_FROM_ISR
|
#ifndef traceTASK_NOTIFY_FROM_ISR
|
||||||
#define traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify )
|
#define traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceTASK_NOTIFY_FROM_ISR_EXT
|
||||||
|
|
||||||
|
/* Extended version of traceTASK_NOTIFY_FROM_ISR that also exposes the task
|
||||||
|
* being notified, and if/how the notification value was modified. */
|
||||||
|
#define traceTASK_NOTIFY_FROM_ISR_EXT( pxTCB, uxIndexToNotify, eAction, xReturn ) traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify )
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef traceTASK_NOTIFY_GIVE_FROM_ISR
|
#ifndef traceTASK_NOTIFY_GIVE_FROM_ISR
|
||||||
#define traceTASK_NOTIFY_GIVE_FROM_ISR( uxIndexToNotify )
|
#define traceTASK_NOTIFY_GIVE_FROM_ISR( uxIndexToNotify )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceTASK_NOTIFY_GIVE_FROM_ISR_EXT
|
||||||
|
|
||||||
|
/* Extended version of traceTASK_NOTIFY_GIVE_FROM_ISR that also exposes the task
|
||||||
|
* being notified. */
|
||||||
|
#define traceTASK_NOTIFY_GIVE_FROM_ISR_EXT( pxTCB, uxIndexToNotify ) traceTASK_NOTIFY_GIVE_FROM_ISR( uxIndexToNotify )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceTASK_NOTIFY_STATE_CLEAR
|
||||||
|
#define traceTASK_NOTIFY_STATE_CLEAR( pxTCB, uxIndexToNotify )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceTASK_NOTIFY_VALUE_CLEAR
|
||||||
|
#define traceTASK_NOTIFY_VALUE_CLEAR( pxTCB, uxIndexToNotify, ulBitsToClear )
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef traceISR_EXIT_TO_SCHEDULER
|
#ifndef traceISR_EXIT_TO_SCHEDULER
|
||||||
#define traceISR_EXIT_TO_SCHEDULER()
|
#define traceISR_EXIT_TO_SCHEDULER()
|
||||||
#endif
|
#endif
|
||||||
|
@ -1044,6 +1159,18 @@
|
||||||
#define traceSTREAM_BUFFER_RECEIVE_FROM_ISR( xStreamBuffer, xReceivedLength )
|
#define traceSTREAM_BUFFER_RECEIVE_FROM_ISR( xStreamBuffer, xReceivedLength )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceSTREAM_BUFFER_SET_TRIGGER_LEVEL
|
||||||
|
#define traceSTREAM_BUFFER_SET_TRIGGER_LEVEL( xStreamBuffer, xTriggerLevel )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceSTREAM_BUFFER_SET_TRIGGER_LEVEL_FAILED
|
||||||
|
#define traceSTREAM_BUFFER_SET_TRIGGER_LEVEL_FAILED( xStreamBuffer )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef traceSTREAM_BUFFER_SET_NOTIFICATION_INDEX
|
||||||
|
#define traceSTREAM_BUFFER_SET_NOTIFICATION_INDEX( xStreamBuffer, uxNotificationIndex )
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef traceENTER_xEventGroupCreateStatic
|
#ifndef traceENTER_xEventGroupCreateStatic
|
||||||
#define traceENTER_xEventGroupCreateStatic( pxEventGroupBuffer )
|
#define traceENTER_xEventGroupCreateStatic( pxEventGroupBuffer )
|
||||||
#endif
|
#endif
|
||||||
|
|
22
queue.c
22
queue.c
|
@ -355,10 +355,14 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
taskEXIT_CRITICAL();
|
taskEXIT_CRITICAL();
|
||||||
|
|
||||||
|
traceQUEUE_RESET( pxQueue, xNewQueue );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
|
|
||||||
|
traceQUEUE_RESET_FAILED( pxQueue, xNewQueue );
|
||||||
}
|
}
|
||||||
|
|
||||||
configASSERT( xReturn != pdFAIL );
|
configASSERT( xReturn != pdFAIL );
|
||||||
|
@ -876,7 +880,7 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
||||||
{
|
{
|
||||||
( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
|
( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
|
||||||
|
|
||||||
traceCREATE_COUNTING_SEMAPHORE();
|
traceCREATE_COUNTING_SEMAPHORE_EXT( xHandle );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -915,7 +919,7 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
||||||
{
|
{
|
||||||
( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
|
( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
|
||||||
|
|
||||||
traceCREATE_COUNTING_SEMAPHORE();
|
traceCREATE_COUNTING_SEMAPHORE_EXT( xHandle );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -966,7 +970,7 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
|
||||||
* queue is full. */
|
* queue is full. */
|
||||||
if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
|
if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
|
||||||
{
|
{
|
||||||
traceQUEUE_SEND( pxQueue );
|
traceQUEUE_SEND_EXT( pxQueue, xCopyPosition );
|
||||||
|
|
||||||
#if ( configUSE_QUEUE_SETS == 1 )
|
#if ( configUSE_QUEUE_SETS == 1 )
|
||||||
{
|
{
|
||||||
|
@ -1080,7 +1084,7 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
|
||||||
|
|
||||||
/* Return to the original privilege level before exiting
|
/* Return to the original privilege level before exiting
|
||||||
* the function. */
|
* the function. */
|
||||||
traceQUEUE_SEND_FAILED( pxQueue );
|
traceQUEUE_SEND_FAILED_EXT( pxQueue, xCopyPosition );
|
||||||
traceRETURN_xQueueGenericSend( errQUEUE_FULL );
|
traceRETURN_xQueueGenericSend( errQUEUE_FULL );
|
||||||
|
|
||||||
return errQUEUE_FULL;
|
return errQUEUE_FULL;
|
||||||
|
@ -1145,7 +1149,7 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
|
||||||
prvUnlockQueue( pxQueue );
|
prvUnlockQueue( pxQueue );
|
||||||
( void ) xTaskResumeAll();
|
( void ) xTaskResumeAll();
|
||||||
|
|
||||||
traceQUEUE_SEND_FAILED( pxQueue );
|
traceQUEUE_SEND_FAILED_EXT( pxQueue, xCopyPosition );
|
||||||
traceRETURN_xQueueGenericSend( errQUEUE_FULL );
|
traceRETURN_xQueueGenericSend( errQUEUE_FULL );
|
||||||
|
|
||||||
return errQUEUE_FULL;
|
return errQUEUE_FULL;
|
||||||
|
@ -1200,7 +1204,7 @@ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue,
|
||||||
const int8_t cTxLock = pxQueue->cTxLock;
|
const int8_t cTxLock = pxQueue->cTxLock;
|
||||||
const UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting;
|
const UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting;
|
||||||
|
|
||||||
traceQUEUE_SEND_FROM_ISR( pxQueue );
|
traceQUEUE_SEND_FROM_ISR_EXT( pxQueue, xCopyPosition );
|
||||||
|
|
||||||
/* Semaphores use xQueueGiveFromISR(), so pxQueue will not be a
|
/* Semaphores use xQueueGiveFromISR(), so pxQueue will not be a
|
||||||
* semaphore or mutex. That means prvCopyDataToQueue() cannot result
|
* semaphore or mutex. That means prvCopyDataToQueue() cannot result
|
||||||
|
@ -1314,7 +1318,7 @@ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue );
|
traceQUEUE_SEND_FROM_ISR_FAILED_EXT( pxQueue, xCopyPosition );
|
||||||
xReturn = errQUEUE_FULL;
|
xReturn = errQUEUE_FULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1382,7 +1386,7 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
||||||
{
|
{
|
||||||
const int8_t cTxLock = pxQueue->cTxLock;
|
const int8_t cTxLock = pxQueue->cTxLock;
|
||||||
|
|
||||||
traceQUEUE_SEND_FROM_ISR( pxQueue );
|
traceQUEUE_SEND_FROM_ISR_EXT( pxQueue, queueSEND_TO_BACK );
|
||||||
|
|
||||||
/* A task can only have an inherited priority if it is a mutex
|
/* A task can only have an inherited priority if it is a mutex
|
||||||
* holder - and if there is a mutex holder then the mutex cannot be
|
* holder - and if there is a mutex holder then the mutex cannot be
|
||||||
|
@ -1487,7 +1491,7 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue );
|
traceQUEUE_SEND_FROM_ISR_FAILED_EXT( pxQueue, xCopyPosition );
|
||||||
xReturn = errQUEUE_FULL;
|
xReturn = errQUEUE_FULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -737,11 +737,13 @@ BaseType_t xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
|
||||||
* buffer before a task that is waiting for data is unblocked. */
|
* buffer before a task that is waiting for data is unblocked. */
|
||||||
if( xTriggerLevel < pxStreamBuffer->xLength )
|
if( xTriggerLevel < pxStreamBuffer->xLength )
|
||||||
{
|
{
|
||||||
|
traceSTREAM_BUFFER_SET_TRIGGER_LEVEL( xStreamBuffer, xTriggerLevel );
|
||||||
pxStreamBuffer->xTriggerLevelBytes = xTriggerLevel;
|
pxStreamBuffer->xTriggerLevelBytes = xTriggerLevel;
|
||||||
xReturn = pdPASS;
|
xReturn = pdPASS;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
traceSTREAM_BUFFER_SET_TRIGGER_LEVEL_FAILED( xStreamBuffer );
|
||||||
xReturn = pdFALSE;
|
xReturn = pdFALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1662,6 +1664,8 @@ void vStreamBufferSetStreamBufferNotificationIndex( StreamBufferHandle_t xStream
|
||||||
/* Check that the task notification index is valid. */
|
/* Check that the task notification index is valid. */
|
||||||
configASSERT( uxNotificationIndex < configTASK_NOTIFICATION_ARRAY_ENTRIES );
|
configASSERT( uxNotificationIndex < configTASK_NOTIFICATION_ARRAY_ENTRIES );
|
||||||
|
|
||||||
|
traceSTREAM_BUFFER_SET_NOTIFICATION_INDEX( xStreamBuffer, uxNotificationIndex );
|
||||||
|
|
||||||
pxStreamBuffer->uxNotificationIndex = uxNotificationIndex;
|
pxStreamBuffer->uxNotificationIndex = uxNotificationIndex;
|
||||||
|
|
||||||
traceRETURN_vStreamBufferSetStreamBufferNotificationIndex();
|
traceRETURN_vStreamBufferSetStreamBufferNotificationIndex();
|
||||||
|
|
20
tasks.c
20
tasks.c
|
@ -2448,7 +2448,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
||||||
{
|
{
|
||||||
configASSERT( uxSchedulerSuspended == 1U );
|
configASSERT( uxSchedulerSuspended == 1U );
|
||||||
|
|
||||||
traceTASK_DELAY();
|
traceTASK_DELAY_EXT( xTicksToDelay );
|
||||||
|
|
||||||
/* A task that is removed from the event list while the
|
/* A task that is removed from the event list while the
|
||||||
* scheduler is suspended will not get placed in the ready
|
* scheduler is suspended will not get placed in the ready
|
||||||
|
@ -7718,11 +7718,12 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
|
|
||||||
taskENTER_CRITICAL();
|
taskENTER_CRITICAL();
|
||||||
{
|
{
|
||||||
traceTASK_NOTIFY_TAKE( uxIndexToWaitOn );
|
|
||||||
ulReturn = pxCurrentTCB->ulNotifiedValue[ uxIndexToWaitOn ];
|
ulReturn = pxCurrentTCB->ulNotifiedValue[ uxIndexToWaitOn ];
|
||||||
|
|
||||||
if( ulReturn != 0U )
|
if( ulReturn != 0U )
|
||||||
{
|
{
|
||||||
|
traceTASK_NOTIFY_TAKE_EXT( uxIndexToWaitOn, xClearCountOnExit );
|
||||||
|
|
||||||
if( xClearCountOnExit != pdFALSE )
|
if( xClearCountOnExit != pdFALSE )
|
||||||
{
|
{
|
||||||
pxCurrentTCB->ulNotifiedValue[ uxIndexToWaitOn ] = ( uint32_t ) 0U;
|
pxCurrentTCB->ulNotifiedValue[ uxIndexToWaitOn ] = ( uint32_t ) 0U;
|
||||||
|
@ -7734,6 +7735,7 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
traceTASK_NOTIFY_TAKE_FAILED( uxIndexToWaitOn );
|
||||||
mtCOVERAGE_TEST_MARKER();
|
mtCOVERAGE_TEST_MARKER();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7775,6 +7777,8 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
/* Only block if a notification is not already pending. */
|
/* Only block if a notification is not already pending. */
|
||||||
if( pxCurrentTCB->ucNotifyState[ uxIndexToWaitOn ] != taskNOTIFICATION_RECEIVED )
|
if( pxCurrentTCB->ucNotifyState[ uxIndexToWaitOn ] != taskNOTIFICATION_RECEIVED )
|
||||||
{
|
{
|
||||||
|
traceTASK_NOTIFY_VALUE_CLEAR( pxCurrentTCB, uxIndexToWaitOn, ulBitsToClearOnEntry );
|
||||||
|
|
||||||
/* Clear bits in the task's notification value as bits may get
|
/* Clear bits in the task's notification value as bits may get
|
||||||
* set by the notifying task or interrupt. This can be used
|
* set by the notifying task or interrupt. This can be used
|
||||||
* to clear the value to zero. */
|
* to clear the value to zero. */
|
||||||
|
@ -7826,8 +7830,6 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
|
|
||||||
taskENTER_CRITICAL();
|
taskENTER_CRITICAL();
|
||||||
{
|
{
|
||||||
traceTASK_NOTIFY_WAIT( uxIndexToWaitOn );
|
|
||||||
|
|
||||||
if( pulNotificationValue != NULL )
|
if( pulNotificationValue != NULL )
|
||||||
{
|
{
|
||||||
/* Output the current notification value, which may or may not
|
/* Output the current notification value, which may or may not
|
||||||
|
@ -7842,12 +7844,14 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
if( pxCurrentTCB->ucNotifyState[ uxIndexToWaitOn ] != taskNOTIFICATION_RECEIVED )
|
if( pxCurrentTCB->ucNotifyState[ uxIndexToWaitOn ] != taskNOTIFICATION_RECEIVED )
|
||||||
{
|
{
|
||||||
/* A notification was not received. */
|
/* A notification was not received. */
|
||||||
|
traceTASK_NOTIFY_WAIT_FAILED( uxIndexToWaitOn );
|
||||||
xReturn = pdFALSE;
|
xReturn = pdFALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* A notification was already pending or a notification was
|
/* A notification was already pending or a notification was
|
||||||
* received while the task was waiting. */
|
* received while the task was waiting. */
|
||||||
|
traceTASK_NOTIFY_WAIT_EXT( uxIndexToWaitOn, ulBitsToClearOnExit );
|
||||||
pxCurrentTCB->ulNotifiedValue[ uxIndexToWaitOn ] &= ~ulBitsToClearOnExit;
|
pxCurrentTCB->ulNotifiedValue[ uxIndexToWaitOn ] &= ~ulBitsToClearOnExit;
|
||||||
xReturn = pdTRUE;
|
xReturn = pdTRUE;
|
||||||
}
|
}
|
||||||
|
@ -7937,7 +7941,7 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
traceTASK_NOTIFY( uxIndexToNotify );
|
traceTASK_NOTIFY_EXT( pxTCB, uxIndexToNotify, eAction, xReturn );
|
||||||
|
|
||||||
/* If the task is in the blocked state specifically to wait for a
|
/* If the task is in the blocked state specifically to wait for a
|
||||||
* notification then unblock it now. */
|
* notification then unblock it now. */
|
||||||
|
@ -8079,7 +8083,7 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify );
|
traceTASK_NOTIFY_FROM_ISR_EXT( pxTCB, uxIndexToNotify, eAction, xReturn );
|
||||||
|
|
||||||
/* If the task is in the blocked state specifically to wait for a
|
/* If the task is in the blocked state specifically to wait for a
|
||||||
* notification then unblock it now. */
|
* notification then unblock it now. */
|
||||||
|
@ -8315,6 +8319,8 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
pxTCB = prvGetTCBFromHandle( xTask );
|
pxTCB = prvGetTCBFromHandle( xTask );
|
||||||
configASSERT( pxTCB != NULL );
|
configASSERT( pxTCB != NULL );
|
||||||
|
|
||||||
|
traceTASK_NOTIFY_STATE_CLEAR( pxTCB, uxIndexToClear );
|
||||||
|
|
||||||
taskENTER_CRITICAL();
|
taskENTER_CRITICAL();
|
||||||
{
|
{
|
||||||
if( pxTCB->ucNotifyState[ uxIndexToClear ] == taskNOTIFICATION_RECEIVED )
|
if( pxTCB->ucNotifyState[ uxIndexToClear ] == taskNOTIFICATION_RECEIVED )
|
||||||
|
@ -8355,6 +8361,8 @@ TickType_t uxTaskResetEventItemValue( void )
|
||||||
pxTCB = prvGetTCBFromHandle( xTask );
|
pxTCB = prvGetTCBFromHandle( xTask );
|
||||||
configASSERT( pxTCB != NULL );
|
configASSERT( pxTCB != NULL );
|
||||||
|
|
||||||
|
traceTASK_NOTIFY_VALUE_CLEAR( pxTCB, uxIndexToClear, ulBitsToClear );
|
||||||
|
|
||||||
taskENTER_CRITICAL();
|
taskENTER_CRITICAL();
|
||||||
{
|
{
|
||||||
/* Return the notification as it was before the bits were cleared,
|
/* Return the notification as it was before the bits were cleared,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue