Lines Matching full:work

30 	dwork->work.handler = handler;  in k_work_init_delayable()
36 struct k_work *work; in k_work_reschedule() local
40 /* Determine whether the work item is queued already. */ in k_work_reschedule()
41 SYS_SLIST_FOR_EACH_CONTAINER(&work_pending, work, node) { in k_work_reschedule()
42 on_list = work == &dwork->work; in k_work_reschedule()
49 dwork->work.handler(&dwork->work); in k_work_reschedule()
51 (void)sys_slist_remove(&work_pending, NULL, &dwork->work.node); in k_work_reschedule()
54 sys_slist_append(&work_pending, &dwork->work.node); in k_work_reschedule()
62 struct k_work *work; in k_work_schedule() local
64 /* Determine whether the work item is queued already. */ in k_work_schedule()
65 SYS_SLIST_FOR_EACH_CONTAINER(&work_pending, work, node) { in k_work_schedule()
66 if (work == &dwork->work) { in k_work_schedule()
73 dwork->work.handler(&dwork->work); in k_work_schedule()
75 sys_slist_append(&work_pending, &dwork->work.node); in k_work_schedule()
83 (void)sys_slist_find_and_remove(&work_pending, &dwork->work.node); in k_work_cancel_delayable()
88 int k_work_cancel(struct k_work *work) in k_work_cancel() argument
90 (void)sys_slist_find_and_remove(&work_pending, &work->node); in k_work_cancel()
95 void k_work_init(struct k_work *work, k_work_handler_t handler) in k_work_init() argument
97 work->handler = handler; in k_work_init()
100 int k_work_submit(struct k_work *work) in k_work_submit() argument
102 work->handler(work); in k_work_submit()
107 int k_work_busy_get(const struct k_work *work) in k_work_busy_get() argument
114 struct k_work *work; in k_sleep() local
116 SYS_SLIST_FOR_EACH_CONTAINER(&work_pending, work, node) { in k_sleep()
117 if (work->flags & K_WORK_DELAYED) { in k_sleep()
118 struct k_work_delayable *dwork = k_work_delayable_from_work(work); in k_sleep()
126 (void)sys_slist_remove(&work_pending, NULL, &work->node); in k_sleep()
127 work->handler(work); in k_sleep()
142 struct k_work *work, *tmp; in mock_kernel_cleanup() local
145 SYS_SLIST_FOR_EACH_CONTAINER_SAFE(&work_pending, work, tmp, node) { in mock_kernel_cleanup()
146 (void)sys_slist_remove(&work_pending, NULL, &work->node); in mock_kernel_cleanup()
147 work->handler(work); in mock_kernel_cleanup()