29#define might_alloc(gfp) do { (void)(gfp); } while (0)
56#define INIT_WORK(_work, _func) do { \
57 (_work)->func = (_func); \
58 (_work)->pending = 0; \
59 (_work)->data = NULL; \
72#define INIT_WORK_ONSTACK(_work, _func) INIT_WORK(_work, _func)
73#define destroy_work_on_stack(work) do { (void)(work); } while (0)
83static inline bool work_pending(
struct work_struct* work)
103static inline bool __dcl_run_work(
struct work_struct* work)
133static inline bool schedule_work(
struct work_struct* work)
135 __dcl_run_work(work);
143 __dcl_run_work(work);
153static inline bool flush_work(
struct work_struct* work)
159static inline bool cancel_work_sync(
struct work_struct* work)
165static inline void flush_workqueue(
struct workqueue_struct* wq) { (void)wq; }
166static inline void destroy_workqueue(
struct workqueue_struct* wq) { (void)wq; }
215alloc_ordered_workqueue(
const char*
name,
int flags) {
222#define create_singlethread_workqueue(name) \
223 alloc_ordered_workqueue(name, 0)
226#define container_of_work(ptr, type, member) \
227 container_of(ptr, type, member)
235#define INIT_DELAYED_WORK(_dwork, _func) do { \
236 INIT_WORK(&(_dwork)->work, _func); \
237 timer_setup(&(_dwork)->timer, NULL, 0); \
238 (_dwork)->wq = NULL; \
242static inline bool schedule_delayed_work(
struct delayed_work* dwork,
243 unsigned long delay) {
245 __dcl_run_work(&dwork->
work);
251 unsigned long delay) {
254 __dcl_run_work(&dwork->
work);
274 unsigned long delay) {
275 return queue_delayed_work(wq, dwork, delay);
278static inline bool cancel_delayed_work(
struct delayed_work* dwork) {
279 del_timer(&dwork->
timer);
284static inline bool cancel_delayed_work_sync(
struct delayed_work* dwork) {
285 return cancel_delayed_work(dwork);
288static inline bool flush_delayed_work(
struct delayed_work* dwork) {
294#define to_delayed_work(ptr) \
295 container_of(ptr, struct delayed_work, work)
uint8_t flags
Definition virtio.h:0
struct drm_crtc struct drm_plane struct drm_plane const struct drm_crtc_funcs const char * name
Definition drm_crtc.h:1242
Definition workqueue.h:229
struct timer_list timer
Definition workqueue.h:231
struct work_struct work
Definition workqueue.h:230
struct workqueue_struct * wq
Definition workqueue.h:232
Definition workqueue.h:44
int pending
Definition workqueue.h:47
void * data
Definition workqueue.h:46
work_func_t func
Definition workqueue.h:45
Definition workqueue.h:50
const char * name
Definition workqueue.h:51
struct work_struct * current_work(void)
struct workqueue_struct * system_dfl_wq
struct work_struct * dcl_current_work
void(* work_func_t)(struct work_struct *work)
Definition workqueue.h:42
struct workqueue_struct * system_percpu_wq
struct workqueue_struct * system_long_wq