You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/07/08 21:19:53 UTC
[06/50] [abbrv] incubator-mynewt-core git commit: BLE Host - Remove
obsolete ble_hs_thread_safe() fn
BLE Host - Remove obsolete ble_hs_thread_safe() fn
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/eacea950
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/eacea950
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/eacea950
Branch: refs/heads/master
Commit: eacea950a9226533f0a6bd9138ae0986ffdad7dc
Parents: 39660c0
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Jun 20 20:34:49 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Jun 20 20:34:49 2016 -0700
----------------------------------------------------------------------
net/nimble/host/src/ble_hs.c | 6 ------
net/nimble/host/src/ble_hs_conn.c | 12 ++++++------
net/nimble/host/src/ble_hs_priv.h | 1 -
net/nimble/host/src/ble_l2cap_sig.c | 2 +-
net/nimble/host/src/ble_sm.c | 2 +-
net/nimble/host/src/ble_sm_cmd.c | 2 +-
6 files changed, 9 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/eacea950/net/nimble/host/src/ble_hs.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs.c b/net/nimble/host/src/ble_hs.c
index 22797e3..72e6ccf 100644
--- a/net/nimble/host/src/ble_hs.c
+++ b/net/nimble/host/src/ble_hs.c
@@ -104,12 +104,6 @@ ble_hs_locked_by_cur_task(void)
return owner != NULL && owner == os_sched_get_current_task();
}
-int
-ble_hs_thread_safe(void)
-{
- return ble_hs_locked_by_cur_task();
-}
-
/**
* Indicates whether the host's parent task is currently running.
*/
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/eacea950/net/nimble/host/src/ble_hs_conn.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_conn.c b/net/nimble/host/src/ble_hs_conn.c
index ff68bc2..a4b0f16 100644
--- a/net/nimble/host/src/ble_hs_conn.c
+++ b/net/nimble/host/src/ble_hs_conn.c
@@ -208,7 +208,7 @@ ble_hs_conn_insert(struct ble_hs_conn *conn)
return;
#endif
- BLE_HS_DBG_ASSERT(ble_hs_thread_safe());
+ BLE_HS_DBG_ASSERT(ble_hs_locked_by_cur_task());
BLE_HS_DBG_ASSERT_EVAL(ble_hs_conn_find(conn->bhc_handle) == NULL);
SLIST_INSERT_HEAD(&ble_hs_conns, conn, bhc_next);
@@ -221,7 +221,7 @@ ble_hs_conn_remove(struct ble_hs_conn *conn)
return;
#endif
- BLE_HS_DBG_ASSERT(ble_hs_thread_safe());
+ BLE_HS_DBG_ASSERT(ble_hs_locked_by_cur_task());
SLIST_REMOVE(&ble_hs_conns, conn, ble_hs_conn, bhc_next);
}
@@ -235,7 +235,7 @@ ble_hs_conn_find(uint16_t conn_handle)
struct ble_hs_conn *conn;
- BLE_HS_DBG_ASSERT(ble_hs_thread_safe());
+ BLE_HS_DBG_ASSERT(ble_hs_locked_by_cur_task());
SLIST_FOREACH(conn, &ble_hs_conns, bhc_next) {
if (conn->bhc_handle == conn_handle) {
@@ -255,7 +255,7 @@ ble_hs_conn_find_by_addr(uint8_t addr_type, uint8_t *addr)
struct ble_hs_conn *conn;
- BLE_HS_DBG_ASSERT(ble_hs_thread_safe());
+ BLE_HS_DBG_ASSERT(ble_hs_locked_by_cur_task());
SLIST_FOREACH(conn, &ble_hs_conns, bhc_next) {
if (conn->bhc_addr_type == addr_type &&
@@ -278,7 +278,7 @@ ble_hs_conn_find_by_idx(int idx)
struct ble_hs_conn *conn;
int i;
- BLE_HS_DBG_ASSERT(ble_hs_thread_safe());
+ BLE_HS_DBG_ASSERT(ble_hs_locked_by_cur_task());
i = 0;
SLIST_FOREACH(conn, &ble_hs_conns, bhc_next) {
@@ -311,7 +311,7 @@ ble_hs_conn_first(void)
return NULL;
#endif
- BLE_HS_DBG_ASSERT(ble_hs_thread_safe());
+ BLE_HS_DBG_ASSERT(ble_hs_locked_by_cur_task());
return SLIST_FIRST(&ble_hs_conns);
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/eacea950/net/nimble/host/src/ble_hs_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_priv.h b/net/nimble/host/src/ble_hs_priv.h
index 2cb12b4..1be119a 100644
--- a/net/nimble/host/src/ble_hs_priv.h
+++ b/net/nimble/host/src/ble_hs_priv.h
@@ -90,7 +90,6 @@ uint8_t ble_hs_misc_addr_type_to_id(uint8_t addr_type);
void ble_hs_cfg_init(struct ble_hs_cfg *cfg);
int ble_hs_locked_by_cur_task(void);
-int ble_hs_thread_safe(void);
int ble_hs_is_parent_task(void);
void ble_hs_lock(void);
void ble_hs_unlock(void);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/eacea950/net/nimble/host/src/ble_l2cap_sig.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_l2cap_sig.c b/net/nimble/host/src/ble_l2cap_sig.c
index b9c1244..93ba2e2 100644
--- a/net/nimble/host/src/ble_l2cap_sig.c
+++ b/net/nimble/host/src/ble_l2cap_sig.c
@@ -186,7 +186,7 @@ ble_l2cap_sig_proc_insert(struct ble_l2cap_sig_proc *proc)
{
ble_l2cap_sig_dbg_assert_proc_not_inserted(proc);
- BLE_HS_DBG_ASSERT(ble_hs_thread_safe());
+ BLE_HS_DBG_ASSERT(ble_hs_locked_by_cur_task());
STAILQ_INSERT_HEAD(&ble_l2cap_sig_procs, proc, next);
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/eacea950/net/nimble/host/src/ble_sm.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_sm.c b/net/nimble/host/src/ble_sm.c
index 8d7fa74..ab41173 100644
--- a/net/nimble/host/src/ble_sm.c
+++ b/net/nimble/host/src/ble_sm.c
@@ -624,7 +624,7 @@ ble_sm_proc_find(uint16_t conn_handle, uint8_t state, int is_initiator,
struct ble_sm_proc *proc;
struct ble_sm_proc *prev;
- BLE_HS_DBG_ASSERT(ble_hs_thread_safe());
+ BLE_HS_DBG_ASSERT(ble_hs_locked_by_cur_task());
prev = NULL;
STAILQ_FOREACH(proc, &ble_sm_procs, next) {
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/eacea950/net/nimble/host/src/ble_sm_cmd.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_sm_cmd.c b/net/nimble/host/src/ble_sm_cmd.c
index 4151856..3d506b2 100644
--- a/net/nimble/host/src/ble_sm_cmd.c
+++ b/net/nimble/host/src/ble_sm_cmd.c
@@ -34,7 +34,7 @@ ble_sm_tx(uint16_t conn_handle, struct os_mbuf *txom)
struct ble_hs_conn *conn;
int rc;
- BLE_HS_DBG_ASSERT(ble_hs_thread_safe());
+ BLE_HS_DBG_ASSERT(ble_hs_locked_by_cur_task());
STATS_INC(ble_l2cap_stats, sm_tx);