8 #include "int_typedefs.h"
10 #include <linux/types.h>
12 /* Stub workqueue implementation. */
15 typedef void (*work_func_t)(struct work_struct *work);
16 void delayed_work_timer_fn(unsigned long __data);
19 /* atomic_long_t data; */
22 struct list_head entry;
25 struct lockdep_map lockdep_map;
30 struct hlist_node entry;
31 unsigned long expires;
32 void (*function)(unsigned long);
39 struct work_struct work;
40 struct timer_list timer;
42 /* target workqueue and CPU ->timer uses to queue ->work */
43 struct workqueue_struct *wq;
48 static inline bool schedule_work(struct work_struct *work)
54 static inline bool schedule_work_on(int cpu, struct work_struct *work)
60 static inline bool queue_work(struct workqueue_struct *wq,
61 struct work_struct *work)
67 static inline bool queue_delayed_work(struct workqueue_struct *wq,
68 struct delayed_work *dwork,
75 #define INIT_WORK(w, f) \
81 #define INIT_DELAYED_WORK(w, f) INIT_WORK(&(w)->work, (f))
83 #define __WORK_INITIALIZER(n, f) { \
85 .entry = { &(n).entry, &(n).entry }, \
89 /* Don't bother initializing timer. */
90 #define __DELAYED_WORK_INITIALIZER(n, f, tflags) { \
91 .work = __WORK_INITIALIZER((n).work, (f)), \
94 #define DECLARE_WORK(n, f) \
95 struct workqueue_struct n = __WORK_INITIALIZER
97 #define DECLARE_DELAYED_WORK(n, f) \
98 struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f, 0)
100 #define system_power_efficient_wq ((struct workqueue_struct *) NULL)