A queue is a shared resource
A workqueue processes handlers on a dedicated thread. Moving work out of an interrupt can simplify the interrupt path, but a long handler still delays later items on the same queue.
Read the Zephyr documentation ↗Study notes on Zephyr workqueues, sensor samples, and the boundaries between concurrent tasks.
A workqueue processes handlers on a dedicated thread. Moving work out of an interrupt can simplify the interrupt path, but a long handler still delays later items on the same queue.
Read the Zephyr documentation ↗Fetching a sensor sample blocks the calling thread and stores data in the driver. Channel-get reads the stored sample. Treat these as two stages when considering latency and the lifetime of a reading.
Read the Zephyr documentation ↗Choose who owns sensor acquisition. Multiple contexts that fetch and get without a locking mechanism can produce undefined behavior. Write down the intended ownership before adding another reader.
Read the Zephyr documentation ↗A small collection of embedded-systems study notes. These examples are starting points for exploration; check the documentation for your Zephyr release and board.