pthread: fix pthread_mutex_destroy() breaking priority inheritance
This commit is contained in:
parent
cf056a7d0b
commit
739cc9b2fb
|
@ -593,7 +593,12 @@ int pthread_mutex_destroy(pthread_mutex_t *mutex)
|
|||
return EBUSY;
|
||||
}
|
||||
|
||||
// FreeRTOS mutex must not be deleted while taken (breaks priority inheritance):
|
||||
vTaskSuspendAll();
|
||||
pthread_mutex_unlock(mutex);
|
||||
vSemaphoreDelete(mux->sem);
|
||||
xTaskResumeAll();
|
||||
|
||||
free(mux);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue