You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ry...@apache.org on 2019/03/20 13:01:58 UTC

[mynewt-nimble] branch master updated: ll_dtm: add missing critical sections

This is an automated email from the ASF dual-hosted git repository.

rymek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new 4e3032d  ll_dtm: add missing critical sections
4e3032d is described below

commit 4e3032d6049ff940e980312650de8efed43323a6
Author: Hauke Petersen <ha...@fu-berlin.de>
AuthorDate: Thu Mar 7 12:29:59 2019 +0100

    ll_dtm: add missing critical sections
---
 nimble/controller/src/ble_ll_dtm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/nimble/controller/src/ble_ll_dtm.c b/nimble/controller/src/ble_ll_dtm.c
index 68dfd22..31035ee 100644
--- a/nimble/controller/src/ble_ll_dtm.c
+++ b/nimble/controller/src/ble_ll_dtm.c
@@ -384,7 +384,9 @@ ble_ll_dtm_rx_start(void)
 
 #ifdef BLE_XCVR_RFCLK
     if (ble_ll_xcvr_rfclk_state() == BLE_RFCLK_STATE_OFF) {
+        OS_ENTER_CRITICAL(sr);
         ble_ll_xcvr_rfclk_start_now(os_cputime_get32());
+        OS_EXIT_CRITICAL(sr);
     }
 #endif
 
@@ -430,7 +432,9 @@ ble_ll_dtm_ctx_free(struct dtm_ctx * ctx)
     ble_phy_disable_dtm();
     ble_ll_state_set(BLE_LL_STATE_STANDBY);
 #ifdef BLE_XCVR_RFCLK
+    OS_ENTER_CRITICAL(sr);
     ble_ll_xcvr_rfclk_stop();
+    OS_EXIT_CRITICAL(sr);
 #endif
 
     os_mbuf_free_chain(ctx->om);