mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 13:01:57 -04: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:
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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue