October 2017
Intermediate to advanced
586 pages
14h 8m
English
The predefined work queue is defined in kernel/workqueue.c as follows:
struct workqueue_struct *system_wq __read_mostly;
This is just standard work for which the kernel provides a custom API that simply wraps around the standard one.
Comparisons between kernel predefined work queue functions and standard work queue functions are shown as follows:
|
Predefined work queue function |
Equivalent standard work queue function |
|
schedule_work(w) |
queue_work(keventd_wq,w) |
|
schedule_delayed_work(w,d) |
queue_delayed_work(keventd_wq,w,d)(on any CPU) |
|
schedule_delayed_work_on(cpu,w,d) |
queue_delayed_work(keventd_wq,w,d) (on a given CPU) |
|
flush_scheduled_work() |
flush_workqueue(keventd_wq) ... |