1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| 157 #define __WORK_INITIALIZER(n, f) { \ 158 .data = WORK_DATA_STATIC_INIT(), \ 159 .entry = { &(n).entry, &(n).entry }, \ 160 .func = (f), \ 161 __WORK_INIT_LOCKDEP_MAP(#n, &(n)) \ 162 } 163 164 #define __DELAYED_WORK_INITIALIZER(n, f, tflags) { \ 165 .work = __WORK_INITIALIZER((n).work, (f)), \ 166 .timer = __TIMER_INITIALIZER(delayed_work_timer_fn, \ 167 0, (unsigned long)&(n), \ 168 (tflags) | TIMER_IRQSAFE), \ 169 } 170 171 #define DECLARE_WORK(n, f) \ 172 struct work_struct n = __WORK_INITIALIZER(n, f) 173 174 #define DECLARE_DELAYED_WORK(n, f) \ 175 struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f, 0)
|