zephyr::raw

Function k_work_queue_stop

Source
pub unsafe extern "C" fn k_work_queue_stop(
    queue: *mut k_work_q,
    timeout: k_timeout_t,
) -> i32
Expand description

@brief Stop a work queue.

Stops the work queue thread and ensures that no further work will be processed. This call is blocking and guarantees that the work queue thread has terminated cleanly if successful, no work will be processed past this point.

@param queue Pointer to the queue structure. @param timeout Maximum time to wait for the work queue to stop.

@retval 0 if the work queue was stopped @retval -EALREADY if the work queue was not started (or already stopped) @retval -EBUSY if the work queue is actively processing work items @retval -ETIMEDOUT if the work queue did not stop within the stipulated timeout