October 2017
Intermediate to advanced
354 pages
9h 28m
English
The workqueue API offers two types of functions interfaces: first, a set of interface routines to instantiate and queue work items onto a global workqueue, which is shared by all kernel subsystems and services, and second, a set of interface routines to set up a new workqueue, and queue work items onto it. We will begin to explore workqueue interfaces with macros and functions related to the global shared workqueue.
Each work item in the queue is represented by an instance of type struct work_struct, which is declared in the kernel header <linux/workqueue.h>:
struct work_struct { atomic_long_t data; struct list_head entry; work_func_t func;#ifdef CONFIG_LOCKDEP struct lockdep_map lockdep_map;#endif};
func is a pointer that takes ...