mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Minor changes to the trace macros.
This commit is contained in:
parent
06e8e93eb5
commit
ada4744871
|
@ -314,6 +314,8 @@ size_t xQueueSizeInBytes;
|
||||||
mutual exclusion is required to test the pxMutexHolder variable. */
|
mutual exclusion is required to test the pxMutexHolder variable. */
|
||||||
if( pxMutex->pxMutexHolder == xTaskGetCurrentTaskHandle() )
|
if( pxMutex->pxMutexHolder == xTaskGetCurrentTaskHandle() )
|
||||||
{
|
{
|
||||||
|
traceGIVE_MUTEX_RECURSIVE( pxMutex );
|
||||||
|
|
||||||
/* uxRecursiveCallCount cannot be zero if pxMutexHolder is equal to
|
/* uxRecursiveCallCount cannot be zero if pxMutexHolder is equal to
|
||||||
the task handle, therefore no underflow check is required. Also,
|
the task handle, therefore no underflow check is required. Also,
|
||||||
uxRecursiveCallCount is only modified by the mutex holder, and as
|
uxRecursiveCallCount is only modified by the mutex holder, and as
|
||||||
|
@ -329,9 +331,7 @@ size_t xQueueSizeInBytes;
|
||||||
xQueueGenericSend( pxMutex, NULL, queueMUTEX_GIVE_BLOCK_TIME, queueSEND_TO_BACK );
|
xQueueGenericSend( pxMutex, NULL, queueMUTEX_GIVE_BLOCK_TIME, queueSEND_TO_BACK );
|
||||||
}
|
}
|
||||||
|
|
||||||
xReturn = pdPASS;
|
xReturn = pdPASS;
|
||||||
|
|
||||||
traceGIVE_MUTEX_RECURSIVE( pxMutex );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -356,6 +356,8 @@ size_t xQueueSizeInBytes;
|
||||||
/* Comments regarding mutual exclusion as per those within
|
/* Comments regarding mutual exclusion as per those within
|
||||||
xQueueGiveMutexRecursive(). */
|
xQueueGiveMutexRecursive(). */
|
||||||
|
|
||||||
|
traceTAKE_MUTEX_RECURSIVE( pxMutex );
|
||||||
|
|
||||||
if( pxMutex->pxMutexHolder == xTaskGetCurrentTaskHandle() )
|
if( pxMutex->pxMutexHolder == xTaskGetCurrentTaskHandle() )
|
||||||
{
|
{
|
||||||
( pxMutex->uxRecursiveCallCount )++;
|
( pxMutex->uxRecursiveCallCount )++;
|
||||||
|
@ -371,9 +373,7 @@ size_t xQueueSizeInBytes;
|
||||||
{
|
{
|
||||||
( pxMutex->uxRecursiveCallCount )++;
|
( pxMutex->uxRecursiveCallCount )++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
traceTAKE_MUTEX_RECURSIVE( pxMutex );
|
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1414,6 +1414,8 @@ inline void vTaskIncrementTick( void )
|
||||||
|
|
||||||
void vTaskSwitchContext( void )
|
void vTaskSwitchContext( void )
|
||||||
{
|
{
|
||||||
|
traceTASK_SWITCHED_OUT();
|
||||||
|
|
||||||
if( uxSchedulerSuspended != ( unsigned portBASE_TYPE ) pdFALSE )
|
if( uxSchedulerSuspended != ( unsigned portBASE_TYPE ) pdFALSE )
|
||||||
{
|
{
|
||||||
/* The scheduler is currently suspended - do not allow a context
|
/* The scheduler is currently suspended - do not allow a context
|
||||||
|
|
Loading…
Reference in a new issue