Skip to content
Commit 7b8bce89 authored by Peter Bigot's avatar Peter Bigot Committed by Anas Nashif
Browse files

net: openthread: radio: switch to new API for k_work_pending



Uses of k_work_pending are to be replaced by k_work_is_pending which
conforms to current proposed naming guidelines.

Switch to the new function.

Also initialize the private work structure at build time, rather than
on each iteration (it is not permitted to invoke work API on an
uninitialized work item).

The implementation here is racy: that a work item is pending does not
mean changes since it was first submitted are guaranteed to be seen
when the work item begins (began) executing.

A better solution would be to have transmit_message be able to
determine whether there is unprocessed work.  Then the work item can
be submitted unconditionally.

Signed-off-by: default avatarPeter Bigot <peter.bigot@nordicsemi.no>
parent e3730041
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment