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