haukepetersen opened a new issue #364: npl: ble_npl_hw_is_in_critical() broken for RIOT URL: https://github.com/apache/mynewt-nimble/issues/364 Just wanted to bump the Nimble version to use with RIOT and found nimBLE broken for the latest commit https://github.com/apache/mynewt-nimble/commit/70e1d20d214920623623f22180d4f9df19a22349. Turns out, that the changes introduced in https://github.com/apache/mynewt-nimble/pull/346 are leading to a failing `OS_ASSERT_CRITICAL()` in `nimble/controller/src/ble_ll_xcvr.c:60`. Main cause is that `ble_npl_hw_exit_critical()` is faulty for RIOT. It calls `irq_is_in()`, checking if the code is executed inside of an ISR instead of checking if interrupts are disabled (denoting a critical section in this context). Now the problem is, that RIOT (up until now) does not offer any `isr_is_enabled()` or similar function, hence I can not simply PR a fix for this. I did try to poke the RIOT community about adding this function (see https://github.com/RIOT-OS/RIOT/pull/11117), but this might take a while to sort out... So is there anything we could do to circumvent this issue so I can integrate the latest nimBLE version? Options could be to manually track enter/exit of crit sections using a state variable or maybe disabling `OS_ASSERT_CRITICAL()` for the RIOT port for now?
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
