kernel: Add note regarding safe use of the k_work_pending return value

Add note regarding safe use of the k_work_pending return value. Similar
to the note for k_delayed_work_pending.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
Joakim Andersson 2020-03-05 12:58:31 +01:00 committed by Carles Cufí
commit f327ed2fb9

View file

@ -3222,6 +3222,10 @@ static inline int k_work_submit_to_user_queue(struct k_work_q *work_q,
* This routine indicates if work item @a work is pending in a workqueue's
* queue.
*
* @note Checking if the work is pending gives no guarantee that the
* work will still be pending when this information is used. It is up to
* the caller to make sure that this information is used in a safe manner.
*
* @note Can be called by ISRs.
*
* @param work Address of work item.