mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
esp_ds: ignore releasing mutex if not called from same task
This commit is contained in:
parent
5b34c34fbc
commit
ebf4abca14
@ -91,8 +91,10 @@ esp_err_t esp_ds_init_data_ctx(esp_ds_data_ctx_t *ds_data)
|
|||||||
|
|
||||||
void esp_ds_release_ds_lock(void)
|
void esp_ds_release_ds_lock(void)
|
||||||
{
|
{
|
||||||
/* Give back the semaphore (DS lock) */
|
if (xSemaphoreGetMutexHolder(s_ds_lock) == xTaskGetCurrentTaskHandle()) {
|
||||||
xSemaphoreGive(s_ds_lock);
|
/* Give back the semaphore (DS lock) */
|
||||||
|
xSemaphoreGive(s_ds_lock);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t esp_ds_get_keylen(void *ctx)
|
size_t esp_ds_get_keylen(void *ctx)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user