Topics

[PATCH 0/4] Introduce nano_workqueue API


Vlad Dogaru <vlad.dogaru@...>
 

Patches are also available on Gerrit:
https://gerrit.zephyrproject.org/r/#/q/topic:workqueue

This series introduces a generic way to schedule work that will be
executed in fiber context. The previous implementation was sensor
specific, but had no good reason to be.

The nano_workqueue API is optional. It can be deactivated in Kconfig if
a bare minimum system is desired.

Sensor drivers have been partly migrated to the new API. They can be
further simplified by starting their own workqueues instead of generic
fibers. I intend to do this when I migrate them to the new device
config style I proposed a while ago. Otherwise I'd just rewrite large
chunks of sensor drivers twice.


Vlad Dogaru (4):
nanokernel: Add fiber_config structure and wrapper
nanokernel: Introduce workqueue API
sensor: Rework core to use workqueue API
sensor: Migrate drivers to the new workqueue API

drivers/sensor/Kconfig | 21 ++++----
drivers/sensor/Kconfig.bma280 | 3 +-
drivers/sensor/Kconfig.bmi160 | 2 +-
drivers/sensor/Kconfig.isl29035 | 3 +-
drivers/sensor/Kconfig.lis3dh | 3 +-
drivers/sensor/Kconfig.mcp9808 | 3 +-
drivers/sensor/Kconfig.sht3xd | 3 +-
drivers/sensor/Kconfig.sx9500 | 3 +-
drivers/sensor/Kconfig.tmp007 | 3 +-
drivers/sensor/Makefile | 2 +-
drivers/sensor/sensor.c | 33 +++---------
drivers/sensor/sensor_bma280.h | 2 +-
drivers/sensor/sensor_bma280_trigger.c | 5 +-
drivers/sensor/sensor_bmi160.h | 2 +-
drivers/sensor/sensor_bmi160_trigger.c | 7 ++-
drivers/sensor/sensor_isl29035.h | 2 +-
drivers/sensor/sensor_isl29035_trigger.c | 5 +-
drivers/sensor/sensor_lis3dh.h | 2 +-
drivers/sensor/sensor_lis3dh_trigger.c | 5 +-
drivers/sensor/sensor_mcp9808.h | 2 +-
drivers/sensor/sensor_mcp9808_trigger.c | 5 +-
drivers/sensor/sensor_sht3xd.h | 2 +-
drivers/sensor/sensor_sht3xd_trigger.c | 5 +-
drivers/sensor/sensor_sx9500.h | 2 +-
drivers/sensor/sensor_sx9500_trigger.c | 5 +-
drivers/sensor/sensor_tmp007.h | 2 +-
drivers/sensor/sensor_tmp007_trigger.c | 5 +-
include/misc/nano_work.h | 91 ++++++++++++++++++++++++++++++++
include/nanokernel.h | 25 +++++++++
include/sensor.h | 31 +++++------
kernel/nanokernel/Kconfig | 8 +++
kernel/nanokernel/Makefile | 1 +
kernel/nanokernel/nano_work.c | 47 +++++++++++++++++
33 files changed, 238 insertions(+), 102 deletions(-)
create mode 100644 include/misc/nano_work.h
create mode 100644 kernel/nanokernel/nano_work.c

--
1.9.1