mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-05-17 23:46:36 +08:00
Add an assert o catch overflow of recursive mutex counter (#1254)
Add an assert o catch overflow of recursive mutex counter.
This commit is contained in:

committed by
GitHub

parent
60f34f8503
commit
742729ed29
7
queue.c
7
queue.c
@ -833,6 +833,10 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
||||
if( pxMutex->u.xSemaphore.xMutexHolder == xTaskGetCurrentTaskHandle() )
|
||||
{
|
||||
( pxMutex->u.xSemaphore.uxRecursiveCallCount )++;
|
||||
|
||||
/* Check if an overflow occurred. */
|
||||
configASSERT( pxMutex->u.xSemaphore.uxRecursiveCallCount );
|
||||
|
||||
xReturn = pdPASS;
|
||||
}
|
||||
else
|
||||
@ -845,6 +849,9 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
|
||||
if( xReturn != pdFAIL )
|
||||
{
|
||||
( pxMutex->u.xSemaphore.uxRecursiveCallCount )++;
|
||||
|
||||
/* Check if an overflow occurred. */
|
||||
configASSERT( pxMutex->u.xSemaphore.uxRecursiveCallCount );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user