You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/03/07 21:58:28 UTC

[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on a change in pull request #365: controller: fix missing critical sections for ble_ll_xcvr_rfclk_x calls

andrzej-kaczmarek commented on a change in pull request #365: controller: fix missing critical sections for ble_ll_xcvr_rfclk_x calls
URL: https://github.com/apache/mynewt-nimble/pull/365#discussion_r263586389
 
 

 ##########
 File path: nimble/controller/src/ble_ll_xcvr.c
 ##########
 @@ -102,7 +102,10 @@ void
 ble_ll_xcvr_rfclk_timer_exp(void *arg)
 {
     if (g_ble_ll_data.ll_rfclk_state == BLE_RFCLK_STATE_OFF) {
+        os_sr_t sr;
 
 Review comment:
   this is called the same way in RIOT but since `OS_ASSERT_CRITICAL` does not check explicitly that interrupts are disabled (see https://github.com/apache/mynewt-nimble/pull/366) it will fail because in this case they were disabled by `__HAL_DISABLE_INTERRUPTS` (https://github.com/apache/mynewt-nimble/blob/master/porting/nimble/src/hal_timer.c#L28). I think a better solution would be to change those macros in `hal_timer.c` to use `ble_npl_hw_enter_critical` and `ble_npl_hw_exit_critical` so they "obey" hack in NPL OS implementation.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services