mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
fix(ble_audio): Miscellaneous fixes for ISO & LE Audio (stage 1)
This commit is contained in:
@@ -1216,6 +1216,8 @@ struct bt_gatt_notify_params {
|
||||
uint16_t len;
|
||||
/** Notification Value callback */
|
||||
bt_gatt_complete_func_t func;
|
||||
/** Data passed to @ref func when the notification completes. */
|
||||
void *user_data;
|
||||
/** Att channel options. */
|
||||
enum bt_att_chan_opt chan_opt;
|
||||
};
|
||||
|
||||
@@ -67,12 +67,23 @@ static inline int k_mutex_lock(struct k_mutex *mutex, uint32_t timeout)
|
||||
assert(mutex);
|
||||
assert(mutex->handle);
|
||||
|
||||
if (xSemaphoreTakeRecursive(mutex->handle, timeout) != pdTRUE) {
|
||||
K_MUTEX_LOG_ERR("LockFail");
|
||||
return -EIO;
|
||||
if (xSemaphoreTakeRecursive(mutex->handle, timeout) == pdTRUE) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
#if !CONFIG_BT_ISO_NO_LOG && (CONFIG_BT_ISO_LOG_LEVEL >= BT_ISO_LOG_ERROR)
|
||||
/* On timeout, dump who timed out and who is currently holding the
|
||||
* mutex so the caller's log makes wedge diagnosis a one-look job
|
||||
* instead of a multi-task scavenger hunt.
|
||||
*/
|
||||
TaskHandle_t holder = xSemaphoreGetMutexHolder(mutex->handle);
|
||||
K_MUTEX_LOG_ERR("LockFail[self=%s][holder=%s]",
|
||||
pcTaskGetName(NULL),
|
||||
holder ? pcTaskGetName(holder) : "<none>");
|
||||
#else
|
||||
K_MUTEX_LOG_ERR("LockFail");
|
||||
#endif
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static inline int k_mutex_unlock(struct k_mutex *mutex)
|
||||
|
||||
Reference in New Issue
Block a user