kernel: work: clarify effect of resubmitting pending items

Make more clear that submitting a work item to one queue while it is
pending on another queue has no effect.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2020-10-05 04:50:26 -05:00 committed by Carles Cufí
commit 8f9410a038

View file

@ -3077,12 +3077,12 @@ static inline void k_work_init(struct k_work *work, k_work_handler_t handler)
/** /**
* @brief Submit a work item. * @brief Submit a work item.
* *
* This routine submits work item @a work to be processed by workqueue * This routine submits work item @p work to be processed by workqueue @p
* @a work_q. If the work item is already pending in the workqueue's queue * work_q. If the work item is already pending in @p work_q or any other
* as a result of an earlier submission, this routine has no effect on the * workqueue as a result of an earlier submission, this routine has no
* work item. If the work item has already been processed, or is currently * effect on the work item. If the work item has already been processed, or
* being processed, its work is considered complete and the work item can be * is currently being processed, its work is considered complete and the
* resubmitted. * work item can be resubmitted.
* *
* @warning * @warning
* A submitted work item must not be modified until it has been processed * A submitted work item must not be modified until it has been processed
@ -3298,11 +3298,11 @@ extern int k_delayed_work_cancel(struct k_delayed_work *work);
* @brief Submit a work item to the system workqueue. * @brief Submit a work item to the system workqueue.
* *
* This routine submits work item @a work to be processed by the system * This routine submits work item @a work to be processed by the system
* workqueue. If the work item is already pending in the workqueue's queue * workqueue. If the work item is already pending in the system workqueue or
* as a result of an earlier submission, this routine has no effect on the * any other workqueue as a result of an earlier submission, this routine
* work item. If the work item has already been processed, or is currently * has no effect on the work item. If the work item has already been
* being processed, its work is considered complete and the work item can be * processed, or is currently being processed, its work is considered
* resubmitted. * complete and the work item can be resubmitted.
* *
* @warning * @warning
* Work items submitted to the system workqueue should avoid using handlers * Work items submitted to the system workqueue should avoid using handlers