Lines Matching refs:work
45 typedef void (*kthread_work_func_t)(struct kthread_work *work);
122 kthread_init_work(struct kthread_work *work, kthread_work_func_t func) in kthread_init_work() argument
124 work->tq = NULL; in kthread_init_work()
125 work->func = func; in kthread_init_work()
126 TASK_INIT(&work->task, 0, lkpi_kthread_work_fn, work); in kthread_init_work()
130 kthread_queue_work(struct kthread_worker *worker, struct kthread_work *work) in kthread_queue_work() argument
134 error = taskqueue_enqueue_flags(worker->tq, &work->task, in kthread_queue_work()
137 work->tq = worker->tq; in kthread_queue_work()
142 kthread_cancel_work_sync(struct kthread_work *work) in kthread_cancel_work_sync() argument
146 if (work->tq != NULL && in kthread_cancel_work_sync()
147 taskqueue_cancel(work->tq, &work->task, &pending) != 0) in kthread_cancel_work_sync()
148 taskqueue_drain(work->tq, &work->task); in kthread_cancel_work_sync()
154 kthread_flush_work(struct kthread_work *work) in kthread_flush_work() argument
156 if (work->tq != NULL) in kthread_flush_work()
157 taskqueue_drain(work->tq, &work->task); in kthread_flush_work()