Merge branch 'bugfix/fix_pthread_priority_inheritance' into 'master'

pthread: fix the priority inheritance

See merge request espressif/esp-idf!10094
This commit is contained in:
Angus Gratton 2020-11-17 09:01:58 +08:00
commit 202e6c8984

View File

@ -593,6 +593,14 @@ int pthread_mutex_destroy(pthread_mutex_t *mutex)
return EBUSY;
}
if (mux->type == PTHREAD_MUTEX_RECURSIVE) {
res = xSemaphoreGiveRecursive(mux->sem);
} else {
res = xSemaphoreGive(mux->sem);
}
if (res != pdTRUE) {
assert(false && "Failed to release mutex!");
}
vSemaphoreDelete(mux->sem);
free(mux);