Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: Peter Bigot <[email protected]>
- Loading branch information