mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
freertos: check that mutex is released by owner task
Mutex type semaphores should be acquired and released by the same task. Add a check to xQueueGenericSend for this condition.
This commit is contained in:
@@ -724,6 +724,12 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
|
||||
configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
|
||||
}
|
||||
#endif
|
||||
#if ( configUSE_MUTEXES == 1 && configCHECK_MUTEX_GIVEN_BY_OWNER == 1)
|
||||
{
|
||||
configASSERT(pxQueue->uxQueueType != queueQUEUE_IS_MUTEX || pxQueue->pxMutexHolder == NULL || xTaskGetCurrentTaskHandle() == pxQueue->pxMutexHolder);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* This function relaxes the coding standard somewhat to allow return
|
||||
|
Reference in New Issue
Block a user