This adds nano_work_pending which can be use to check if a nano_work
is pending execution.
Change-Id: Iae0492a750de93fcd7e89e3a2e74509ffce4983b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If the delayed work FIFO never goes empty (e.g. because the work
callback keeps resubmitting or there's a very active ISR feeding items
there) then the fiber would never yield, causing all sorts of problems
for the system. Adding an explicit fiber_yield() call at the end of
the while-loop solves the issue.
Change-Id: I233b9fc18fc9db9172daf8689bd22d09952089cb
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This adds a delayed version of nano_work API which is useful when
handling timeouts since the same stack/workqueue can be shared.
Change-Id: Iac43796fe96deb0a9c8976c91a65104b57779b00
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Add a generic API for drivers to start workqueues and submit work
items. This is needed by drivers which need to schedule code that might
sleep from an ISR to run in fiber context.
Also add the option to start a system-wide workqueue.
Both additions are optional. They can be deactivated for systems that
do not need them.
Change-Id: Ia843568fde5daf6d4279ef7bf241c26c1e3dcfb7
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>