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:
Andrzej Kaczmarek
2017-11-09 15:41:52 +01:00
parent 227f2ec527
commit 6fcaf8e698
+2 -2
View File
@@ -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.