mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-13 12:40:01 +00:00
nimble/host: Enable ble_hs_locked_by_cur_task for debug only
It's used only for debugging anyway. X-Original-Commit: 20d7536988e4f5a210ead7601085470669e959de
This commit is contained in:
@@ -124,20 +124,20 @@ ble_hs_evq_set(struct os_eventq *evq)
|
||||
ble_hs_evq = evq;
|
||||
}
|
||||
|
||||
#if MYNEWT_VAL(BLE_HS_DEBUG)
|
||||
int
|
||||
ble_hs_locked_by_cur_task(void)
|
||||
{
|
||||
struct os_task *owner;
|
||||
|
||||
#if MYNEWT_VAL(BLE_HS_DEBUG)
|
||||
if (!os_started()) {
|
||||
return ble_hs_dbg_mutex_locked;
|
||||
}
|
||||
#endif
|
||||
|
||||
owner = ble_hs_mutex.mu_owner;
|
||||
return owner != NULL && owner == os_sched_get_current_task();
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Indicates whether the host's parent task is currently running.
|
||||
|
||||
Reference in New Issue
Block a user