Is there a way to trigger a work item on a nrfxlib socket event without a dedicated thread? Right now there is three polling mechanism in the SDK:
- Zephyr k_poll(), which works for kernel synchronization primitives and can trigger k_work_poll-s
- zsock_poll(), which works for zephyr sockets
- nrf_poll(), which only works for nrfxlib BSD sockets
In our application there is an event loop that concurrently checks for signal from sensors or the network. I asked at Zephyr Slack if it's possible to trigger work items from sockets, and the answer was that zsock_poll() uses k_poll() internally via an undocumented private API. However, that's only true for Zephyr native stack sockets, polling offloaded sockets invokes nrf_poll() (via an ioctl). Is there a way to route nrf_socket events to k_poll()? If not, it would be nice to provide it in future versions (a quick and dirty solution would be a single callback to trigger a check of all nrf sockets).