Zephyr Project API 4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
k_work_queue_config Struct Reference

A structure holding optional configuration items for a work queue. More...

#include <kernel.h>

Data Fields

const char * name
 The name to be given to the work queue thread.
 
bool no_yield
 Control whether the work queue thread should yield between items.
 
bool essential
 Control whether the work queue thread should be marked as essential thread.
 
uint32_t work_timeout_ms
 Controls whether work queue monitors work timeouts.
 

Detailed Description

A structure holding optional configuration items for a work queue.

This structure, and values it references, are not retained by k_work_queue_start().

Field Documentation

◆ essential

bool k_work_queue_config::essential

Control whether the work queue thread should be marked as essential thread.

◆ name

const char* k_work_queue_config::name

The name to be given to the work queue thread.

If left null the thread will not have a name.

◆ no_yield

bool k_work_queue_config::no_yield

Control whether the work queue thread should yield between items.

Yielding between items helps guarantee the work queue thread does not starve other threads, including cooperative ones released by a work item. This is the default behavior.

Set this to true to prevent the work queue thread from yielding between items. This may be appropriate when a sequence of items should complete without yielding control.

◆ work_timeout_ms

uint32_t k_work_queue_config::work_timeout_ms

Controls whether work queue monitors work timeouts.

If non-zero, and CONFIG_WORKQUEUE_WORK_TIMEOUT is enabled, the work queue will monitor the duration of each work item. If the work item handler takes longer than the specified time to execute, the work queue thread will be aborted, and an error will be logged if CONFIG_LOG is enabled.


The documentation for this struct was generated from the following file: