pub unsafe extern "C" fn k_work_submit_to_queue(
queue: *mut k_work_q,
work: *mut k_work,
) -> i32
Expand description
@brief Submit a work item to a queue.
@param queue pointer to the work queue on which the item should run. If NULL the queue from the most recent submission will be used.
@funcprops \isr_ok
@param work pointer to the work item.
@retval 0 if work was already submitted to a queue @retval 1 if work was not submitted and has been queued to @p queue @retval 2 if work was running and has been queued to the queue that was running it @retval -EBUSY
- if work submission was rejected because the work item is cancelling; or
- @p queue is draining; or
- @p queue is plugged. @retval -EINVAL if @p queue is null and the work item has never been run. @retval -ENODEV if @p queue has not been started.