Merge branch 'bugfix/backport_v3.3_fix_pthread_priority_inheritance' into 'release/v3.3'

pthread: fix the priority inheritance (backport v3.3)

See merge request espressif/esp-idf!11293
This commit is contained in:
Jiang Jiang Jian
2020-11-21 17:51:42 +08:00

View File

@ -591,6 +591,15 @@ 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);