transport/pthread: fix some issues for component

1. transport_ssl: fix transport ssl blocking
2. pthread: fix the priority inheritance
This commit is contained in:
xutao
2020-09-21 15:18:36 +08:00
parent b94eec73fa
commit 7669600253
3 changed files with 24 additions and 8 deletions

View File

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