Lines Matching defs:work
80 INIT_WORK(struct work_struct *work, work_func_t func)
82 work->tq = NULL;
83 task_set(&work->task, (void (*)(void *))func, work);
89 queue_work(struct workqueue_struct *wq, struct work_struct *work)
91 work->tq = (struct taskq *)wq;
92 return task_add(work->tq, &work->task);
96 cancel_work(struct work_struct *work)
98 if (work->tq != NULL)
99 task_del(work->tq, &work->task);
103 cancel_work_sync(struct work_struct *work)
105 if (work->tq != NULL)
106 task_del(work->tq, &work->task);
109 #define work_pending(work) task_pending(&(work)->task)
112 struct work_struct work;
120 to_delayed_work(struct work_struct *work)
122 return container_of(work, struct delayed_work, work);
130 task_add(dwork->tq, &dwork->work.task);
136 INIT_WORK(&dwork->work, func);
137 timeout_set(&dwork->to, __delayed_work_tick, &dwork->work);
143 INIT_WORK(&dwork->work, func);
144 timeout_set(&dwork->to, __delayed_work_tick, &dwork->work);
150 .work.tq = NULL, \
151 .work.task = TASK_INITIALIZER((void (*)(void *))(fn), &(dw).work) \
155 schedule_work(struct work_struct *work)
157 work->tq = (struct taskq *)system_wq;
158 return task_add(work->tq, &work->task);
191 return task_del(dwork->tq, &dwork->work.task);
201 return task_del(dwork->tq, &dwork->work.task);
209 return task_pending(&dwork->work.task);
229 destroy_work_on_stack(struct work_struct *work)
231 if (work->tq)
232 task_del(work->tq, &work->task);
241 struct work_struct work;
246 INIT_RCU_WORK(struct rcu_work *work, work_func_t func)
248 INIT_WORK(&work->work, func);
252 queue_rcu_work(struct workqueue_struct *wq, struct rcu_work *work)
254 return queue_work(wq, &work->work);