doc: kernel: workqueue: explicitly mention K_WORK_DEFINE

Point out that this macro can be used to avoid the need to initialize
a work item.  This is still of limited use since it can't statically
initialize a work item within another structure.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2021-04-21 08:44:26 -05:00 committed by Anas Nashif
commit 1f0082249e

View file

@ -245,7 +245,9 @@ Submitting a Work Item
======================
A work item is defined using a variable of type :c:struct:`k_work`. It must
be initialized by calling :c:func:`k_work_init`.
be initialized by calling :c:func:`k_work_init`, unless it is defined using
:c:macro:`K_WORK_DEFINE` in which case initialization is performed at
compile-time.
An initialized work item can be submitted to the system workqueue by
calling :c:func:`k_work_submit`, or to a specified workqueue by