[riot-notifications] [RIOT-OS/RIOT] cpu/esp: esp_now_netdev fixes and optimizations (#10700)
notifications at github.com
Thu Jan 10 08:52:34 CET 2019
smlng requested changes on this pull request.
> - critical_enter();
+ * The function `esp_now_recv_cb` is executed in the context of the `wifi`
+ * thread. The ISRs handling the hardware interrupts from the WiFi
+ * interface pass events to a message queue of the `wifi` thread which is
+ * sequentially processed by the `wifi` thread to asynchronously execute
+ * callback functions such as `esp_now_recv_cb`.
+ * It should be therefore not possible to reenter function
+ * `esp_now_recv_cb`. To avoid inconsistencies this is checked by an
+ * additional boolean variable . This can not be realized by a mutex
+ * because `esp_now_recv_cb` would be reentered from same thread context.
+ * If the NDEBUG macro is undefined, an assertion is used instead for
+ * debugging purposes.
this seems redundant in light of the following `if`, or not?
+ * Since we are not in the interrupt context, we do not have to pass
+ * `NETDEV_EVENT_ISR` first. We can call the receive function directly.
+ * But we have to unlock the mutex and enable interrupts before.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications