Home
last modified time | relevance | path

Searched refs:work (Results 1 – 25 of 991) sorted by relevance

12345678910>>...40

/Zephyr-latest/tests/bluetooth/audio/mocks/src/
Dkernel.c30 dwork->work.handler = handler; in k_work_init_delayable()
36 struct k_work *work; in k_work_reschedule() local
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
65 SYS_SLIST_FOR_EACH_CONTAINER(&work_pending, work, node) { in k_work_schedule()
66 if (work == &dwork->work) { in k_work_schedule()
[all …]
/Zephyr-latest/tests/kernel/workq/work_queue/
DREADME.txt36 - Submitting work 1 from preempt thread
38 - Submitting work 2 from coop thread
39 - Submitting work 3 from preempt thread
40 - Submitting work 4 from coop thread
42 - Submitting work 5 from preempt thread
43 - Submitting work 6 from coop thread
44 - Waiting for work to finish
51 - Submitting work
52 - Waiting for work to finish
53 - Resubmitting work
[all …]
/Zephyr-latest/kernel/
Dwork.c66 static void handle_flush(struct k_work *work) { } in handle_flush() argument
70 struct k_work *work = &flusher->work; in init_flusher() local
72 k_work_init(&flusher->work, handle_flush); in init_flusher()
73 flag_set(&work->flags, K_WORK_FLUSHING_BIT); in init_flusher()
88 struct k_work *work) in init_work_cancel() argument
91 canceler->work = work; in init_work_cancel()
105 static void finalize_flush_locked(struct k_work *work) in finalize_flush_locked() argument
108 = CONTAINER_OF(work, struct z_work_flusher, work); in finalize_flush_locked()
110 flag_clear(&work->flags, K_WORK_FLUSHING_BIT); in finalize_flush_locked()
125 static void finalize_cancel_locked(struct k_work *work) in finalize_cancel_locked() argument
[all …]
Dpoll.c570 static void triggered_work_handler(struct k_work *work) in triggered_work_handler() argument
573 CONTAINER_OF(work, struct k_work_poll, work); in triggered_work_handler()
590 twork->real_handler(work); in triggered_work_handler()
600 k_work_submit_to_queue(twork->workq, &twork->work); in triggered_work_expiration_handler()
604 struct k_work *work);
617 z_work_submit_to_queue(work_q, &twork->work); in signal_triggered_work()
623 static int triggered_work_cancel(struct k_work_poll *work, in triggered_work_cancel() argument
627 if (work->poller.is_polling && work->poller.mode != MODE_NONE) { in triggered_work_cancel()
629 z_abort_timeout(&work->timeout); in triggered_work_cancel()
635 work->poller.mode = MODE_NONE; in triggered_work_cancel()
[all …]
/Zephyr-latest/subsys/rtio/
Drtio_workq.c23 static void rtio_work_handler(struct k_p4wq_work *work) in rtio_work_handler() argument
25 struct rtio_work_req *req = CONTAINER_OF(work, in rtio_work_handler()
27 work); in rtio_work_handler()
48 req->work.thread = NULL; in rtio_work_req_alloc()
49 (void)k_sem_init(&req->work.done_sem, 1, 1); in rtio_work_req_alloc()
67 struct k_p4wq_work *work = &req->work; in rtio_work_req_submit() local
76 work->handler = rtio_work_handler; in rtio_work_req_submit()
77 work->deadline = 0; in rtio_work_req_submit()
80 work->priority = RTIO_WORKQ_PRIO_LOW; in rtio_work_req_submit()
82 work->priority = RTIO_WORKQ_PRIO_HIGH; in rtio_work_req_submit()
[all …]
/Zephyr-latest/boards/sifive/hifive_unleashed/support/
Dopenocd_hifive_unleashed.cfg20 $_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
21 $_TARGETNAME.1 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
22 $_TARGETNAME.2 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
23 $_TARGETNAME.3 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
24 $_TARGETNAME.4 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
/Zephyr-latest/boards/sifive/hifive_unmatched/support/
Dopenocd_hifive_unmatched.cfg20 $_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
21 $_TARGETNAME.1 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
22 $_TARGETNAME.2 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
23 $_TARGETNAME.3 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
24 $_TARGETNAME.4 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
/Zephyr-latest/modules/nrf_wifi/os/
Dtimer.c21 static void timer_expiry_function(struct k_work *work) in timer_expiry_function() argument
25 timer = (struct timer_list *)CONTAINER_OF(work, struct timer_list, work.work); in timer_expiry_function()
32 k_work_init_delayable(&timer->work, timer_expiry_function); in init_timer()
37 k_work_schedule(&timer->work, K_MSEC(msec)); in mod_timer()
42 k_work_cancel_delayable(&timer->work); in del_timer_sync()
Dwork.h27 struct k_work work; member
35 void work_init(struct zep_work_item *work, void (*callback)(unsigned long callbk_data),
38 void work_schedule(struct zep_work_item *work);
40 void work_kill(struct zep_work_item *work);
42 void work_free(struct zep_work_item *work);
Dwork.c53 void workqueue_callback(struct k_work *work) in workqueue_callback() argument
55 struct zep_work_item *item = CONTAINER_OF(work, struct zep_work_item, work); in workqueue_callback()
129 k_work_init(&item->work, workqueue_callback); in work_init()
135 k_work_submit_to_queue(&zep_wifi_intr_q, &item->work); in work_schedule()
137 k_work_submit_to_queue(&zep_wifi_bh_q, &item->work); in work_schedule()
141 k_work_submit_to_queue(&zep_wifi_tx_done_q, &item->work); in work_schedule()
146 k_work_submit_to_queue(&zep_wifi_rx_q, &item->work); in work_schedule()
154 k_work_cancel(&item->work); in work_kill()
/Zephyr-latest/tests/kernel/workq/work_queue/src/
Dmain.c50 struct k_work_delayable work; member
55 struct k_work_poll work; member
85 struct k_work_poll work; member
93 static void work_handler(struct k_work *work) in work_handler() argument
95 struct k_work_delayable *dwork = k_work_delayable_from_work(work); in work_handler()
97 CONTAINER_OF(dwork, struct delayed_test_item, work); in work_handler()
115 k_work_init_delayable(&delayed_tests[i].work, work_handler); in delayed_test_items_init()
143 k_work_schedule(&delayed_tests[i].work, K_NO_WAIT); in coop_work_main()
162 k_work_schedule(&delayed_tests[i].work, K_NO_WAIT); in delayed_test_items_submit()
208 static void resubmit_work_handler(struct k_work *work) in resubmit_work_handler() argument
[all …]
Dstart_stop.c18 static void work_handler(struct k_work *work) in work_handler() argument
20 ARG_UNUSED(work); in work_handler()
27 struct k_work work; in ZTEST() local
54 k_work_init(&work, work_handler); in ZTEST()
55 zassert_equal(k_work_submit_to_queue(&work_q, &work), -ENODEV, in ZTEST()
/Zephyr-latest/tests/kernel/workq/user_work/src/
Dmain.c24 static ZTEST_BMEM struct k_work_user work[NUM_OF_WORK]; variable
64 k_work_user_init(&work[0], common_work_handler); in test_k_work_user_submit_to_queue_fail()
65 k_work_user_init(&work[1], common_work_handler); in test_k_work_user_submit_to_queue_fail()
71 k_work_user_submit_to_queue(&user_workq, &work[0]); in test_k_work_user_submit_to_queue_fail()
72 zassert_true(k_work_user_is_pending(&work[0])); in test_k_work_user_submit_to_queue_fail()
73 k_work_user_submit_to_queue(&user_workq, &work[0]); in test_k_work_user_submit_to_queue_fail()
78 zassert_false(k_work_user_is_pending(&work[0])); in test_k_work_user_submit_to_queue_fail()
82 ret = k_queue_alloc_append(&user_workq.queue, &work[1]); in test_k_work_user_submit_to_queue_fail()
88 k_work_user_submit_to_queue(&user_workq, &work[0]); in test_k_work_user_submit_to_queue_fail()
90 zassert_false(k_work_user_is_pending(&work[0])); in test_k_work_user_submit_to_queue_fail()
[all …]
/Zephyr-latest/doc/kernel/services/threads/
Dworkqueue.rst11 work items in a first in, first out manner. Each work item is processed by
12 calling the function specified by the work item. A workqueue is typically
21 * A **queue** of work items that have been added, but not yet processed.
23 * A **thread** that processes the work items in the queue. The priority of the
28 between each submitted work item, to prevent a cooperative workqueue from
33 when no work items are available.
39 * Precise tracking of the status of cancelled work items, so that the
43 * Direct submission of delayable work items to the queue with
46 * The ability to wait until a work item has completed or a queue has been
48 * Finer control of behavior when scheduling a delayable work item,
[all …]
Dnothread.rst15 been limited, there are conditions on what can be expected to work in
50 Functionality that will not work with :kconfig:option:`CONFIG_MULTITHREADING`
77 expected to work to some degree when :kconfig:option:`CONFIG_MULTITHREADING` is
79 work.
81 Some existing drivers within the listed subsystems do not work when
85 capabilities that were not originally implemented to work with threads
91 The :ref:`flash_api` is expected to work for all SoC flash peripheral
100 The :ref:`gpio_api` is expected to work for all SoC GPIO peripheral
108 A subset of the :ref:`uart_api` is expected to work for all SoC UART
112 work, depending on driver implementation.
[all …]
/Zephyr-latest/lib/os/
Duser_work.c18 struct k_work_user *work; in z_work_user_q_main() local
21 work = k_queue_get(&work_q->queue, K_FOREVER); in z_work_user_q_main()
22 if (work == NULL) { in z_work_user_q_main()
26 handler = work->handler; in z_work_user_q_main()
30 if (atomic_test_and_clear_bit(&work->flags, in z_work_user_q_main()
32 handler(work); in z_work_user_q_main()
/Zephyr-latest/tests/kernel/interrupt/src/
Dinterrupt_offload.c46 struct k_work *work; member
52 static void entry_offload_job(struct k_work *work) in entry_offload_job() argument
71 struct k_work *work = ((struct interrupt_param *)param)->work; in isr_handler() local
73 zassert_not_null(work, "kwork should not be NULL"); in isr_handler()
78 if (!k_work_busy_get(work)) { in isr_handler()
79 zassert_equal(k_work_submit_to_queue(&wq_queue, work), in isr_handler()
125 static void trigger_offload_interrupt(const bool real_irq, void *work) in trigger_offload_interrupt() argument
127 irq_param.work = work; in trigger_offload_interrupt()
/Zephyr-latest/subsys/mgmt/mcumgr/transport/src/
Dsmp.c131 smp_handle_reqs(struct k_work *work) in smp_handle_reqs() argument
136 smpt = (void *)work; in smp_handle_reqs()
157 k_work_init(&smpt->work, smp_handle_reqs); in smp_transport_init()
203 k_work_submit_to_queue(&smp_work_queue, &smpt->work); in smp_rx_req()
224 if (k_work_busy_get(&zst->work) & (K_WORK_RUNNING | K_WORK_QUEUED)) { in smp_rx_remove_invalid()
225 k_work_cancel(&zst->work); in smp_rx_remove_invalid()
248 k_work_submit_to_queue(&smp_work_queue, &zst->work); in smp_rx_remove_invalid()
257 if (k_work_busy_get(&zst->work) & (K_WORK_RUNNING | K_WORK_QUEUED)) { in smp_rx_clear()
258 k_work_cancel(&zst->work); in smp_rx_clear()
/Zephyr-latest/boards/digilent/arty_a7/support/
Dopenocd_arty_a7_arm_designstart.cfg6 $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
/Zephyr-latest/drivers/sensor/nuvoton/nuvoton_adc_cmp_npcx/
DKconfig19 bool "NPCX ADC threshold detection uses internal work queue"
21 Threshold detection ISR utilizes system work queue for calling
22 trigger handlers; set this option to use dedicated work queue instead.
27 int "Nuvoton NPCX ADC trheshold detection work queue priority"
34 int "Nuvoton NPCX ADC trheshold detection work queue stack size"
/Zephyr-latest/subsys/input/
Dinput_double_tap.c27 struct k_work_delayable work; member
32 static void double_tap_deferred(struct k_work *work) in double_tap_deferred() argument
34 struct k_work_delayable *dwork = k_work_delayable_from_work(work); in double_tap_deferred()
36 CONTAINER_OF(dwork, struct double_tap_data_entry, work); in double_tap_deferred()
66 k_work_cancel_delayable(&entry->work); in double_tap_cb()
72 k_work_schedule(&entry->work, K_MSEC(cfg->double_tap_delay_ms)); in double_tap_cb()
92 k_work_init_delayable(&entry->work, double_tap_deferred); in double_tap_init()
/Zephyr-latest/samples/subsys/zbus/work_queue/src/
Dmain.c69 struct k_work work; member
81 struct sensor_wq_info *sens = CONTAINER_OF(item, struct sensor_wq_info, work); in wq_dh_cb()
94 k_work_submit(&wq_handler1.work); in dh1_cb()
103 k_work_submit(&wq_handler2.work); in dh2_cb()
112 k_work_submit(&wq_handler3.work); in dh3_cb()
119 k_work_init(&wq_handler1.work, wq_dh_cb); in main()
120 k_work_init(&wq_handler2.work, wq_dh_cb); in main()
121 k_work_init(&wq_handler3.work, wq_dh_cb); in main()
/Zephyr-latest/boards/wch/ch32v003evt/support/
Dopenocd.cfg10 $_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 10000 -work-area-backup 1
/Zephyr-latest/drivers/input/
Dinput_chsc6x.c22 struct k_work work; member
64 static void chsc6x_work_handler(struct k_work *work) in chsc6x_work_handler() argument
66 struct chsc6x_data *data = CONTAINER_OF(work, struct chsc6x_data, work); in chsc6x_work_handler()
75 k_work_submit(&data->work); in chsc6x_isr_handler()
97 k_work_init(&data->work, chsc6x_work_handler); in chsc6x_init()
/Zephyr-latest/drivers/sensor/adi/adt7310/
Dadt7310_trigger.c28 k_work_submit(&drv_data->work); in adt7310_gpio_callback()
49 static void adt7310_work_cb(struct k_work *work) in adt7310_work_cb() argument
51 struct adt7310_data *drv_data = CONTAINER_OF(work, struct adt7310_data, work); in adt7310_work_cb()
97 k_work_submit(&drv_data->work); in adt7310_trigger_set()
138 drv_data->work.handler = adt7310_work_cb; in adt7310_init_interrupt()

12345678910>>...40