Home
last modified time | relevance | path

Searched refs:queue (Results 1 – 25 of 174) sorted by relevance

1234567

/Zephyr-Core-3.4.0/kernel/
Dqueue.c58 void z_impl_k_queue_init(struct k_queue *queue) in z_impl_k_queue_init() argument
60 sys_sflist_init(&queue->data_q); in z_impl_k_queue_init()
61 queue->lock = (struct k_spinlock) {}; in z_impl_k_queue_init()
62 z_waitq_init(&queue->wait_q); in z_impl_k_queue_init()
64 sys_dlist_init(&queue->poll_events); in z_impl_k_queue_init()
67 SYS_PORT_TRACING_OBJ_INIT(k_queue, queue); in z_impl_k_queue_init()
69 z_object_init(queue); in z_impl_k_queue_init()
73 static inline void z_vrfy_k_queue_init(struct k_queue *queue) in z_vrfy_k_queue_init() argument
75 Z_OOPS(Z_SYSCALL_OBJ_NEVER_INIT(queue, K_OBJ_QUEUE)); in z_vrfy_k_queue_init()
76 z_impl_k_queue_init(queue); in z_vrfy_k_queue_init()
[all …]
Dwork.c171 static void queue_flusher_locked(struct k_work_q *queue, in queue_flusher_locked() argument
179 SYS_SLIST_FOR_EACH_CONTAINER(&queue->pending, wn, node) { in queue_flusher_locked()
188 sys_slist_insert(&queue->pending, &work->node, in queue_flusher_locked()
191 sys_slist_prepend(&queue->pending, &flusher->work.node); in queue_flusher_locked()
202 static inline void queue_remove_locked(struct k_work_q *queue, in queue_remove_locked() argument
206 (void)sys_slist_find_and_remove(&queue->pending, &work->node); in queue_remove_locked()
221 static inline bool notify_queue_locked(struct k_work_q *queue) in notify_queue_locked() argument
225 if (queue != NULL) { in notify_queue_locked()
226 rv = z_sched_wake(&queue->notifyq, 0, NULL); in notify_queue_locked()
251 static inline int queue_submit_locked(struct k_work_q *queue, in queue_submit_locked() argument
[all …]
/Zephyr-Core-3.4.0/subsys/bluetooth/controller/ll_sw/
Dull_tx_queue.c11 void ull_tx_q_init(struct ull_tx_q *queue) in ull_tx_q_init() argument
13 queue->pause_data = 0U; in ull_tx_q_init()
14 sys_slist_init(&queue->tx_list); in ull_tx_q_init()
15 sys_slist_init(&queue->data_list); in ull_tx_q_init()
18 void ull_tx_q_pause_data(struct ull_tx_q *queue) in ull_tx_q_pause_data() argument
20 queue->pause_data++; in ull_tx_q_pause_data()
23 void ull_tx_q_resume_data(struct ull_tx_q *queue) in ull_tx_q_resume_data() argument
25 if (queue->pause_data > 0) { in ull_tx_q_resume_data()
26 queue->pause_data--; in ull_tx_q_resume_data()
30 if (!queue->pause_data && !sys_slist_is_empty(&queue->data_list)) { in ull_tx_q_resume_data()
[all …]
Dull_tx_queue.h22 void ull_tx_q_init(struct ull_tx_q *queue);
29 void ull_tx_q_pause_data(struct ull_tx_q *queue);
36 void ull_tx_q_resume_data(struct ull_tx_q *queue);
44 void ull_tx_q_enqueue_data(struct ull_tx_q *queue, struct node_tx *tx);
52 void ull_tx_q_enqueue_ctrl(struct ull_tx_q *queue, struct node_tx *tx);
61 struct node_tx *ull_tx_q_peek(struct ull_tx_q *queue);
70 struct node_tx *ull_tx_q_dequeue(struct ull_tx_q *queue);
/Zephyr-Core-3.4.0/samples/arch/smp/pktqueue/src/
Dpktqueue.c10 void phdr_desc_enqueue(struct phdr_desc_queue *queue, struct phdr_desc *desc, in phdr_desc_enqueue() argument
16 if (queue->count == 0) { in phdr_desc_enqueue()
17 queue->head = queue->tail = desc; in phdr_desc_enqueue()
19 queue->tail->next = desc; in phdr_desc_enqueue()
20 queue->tail = desc; in phdr_desc_enqueue()
22 queue->count++; in phdr_desc_enqueue()
30 struct phdr_desc *phdr_desc_dequeue(struct phdr_desc_queue *queue, in phdr_desc_dequeue() argument
36 if (queue->count != 0) { in phdr_desc_dequeue()
37 queue->count--; in phdr_desc_dequeue()
38 return_ptr = queue->head; in phdr_desc_dequeue()
[all …]
/Zephyr-Core-3.4.0/lib/os/
Dp4wq.c78 struct k_p4wq *queue = p0; in p4wq_loop() local
79 k_spinlock_key_t k = k_spin_lock(&queue->lock); in p4wq_loop()
82 struct rbnode *r = rb_get_max(&queue->queue); in p4wq_loop()
88 rb_remove(&queue->queue, r); in p4wq_loop()
90 sys_dlist_append(&queue->active, &w->dlnode); in p4wq_loop()
94 k_spin_unlock(&queue->lock, k); in p4wq_loop()
98 k = k_spin_lock(&queue->lock); in p4wq_loop()
109 z_pend_curr(&queue->lock, k, &queue->waitq, K_FOREVER); in p4wq_loop()
110 k = k_spin_lock(&queue->lock); in p4wq_loop()
125 void k_p4wq_init(struct k_p4wq *queue) in k_p4wq_init() argument
[all …]
/Zephyr-Core-3.4.0/samples/subsys/portability/cmsis_rtos_v1/timer_synchronization/
DREADME.rst11 The main thread creates a preemptive thread which writes message to message queue
32 Wrote to message queue: 5
33 Read from message queue: 5
35 Wrote to message queue: 6
36 Read from message queue: 6
38 Wrote to message queue: 7
39 Read from message queue: 7
41 Wrote to message queue: 8
42 Read from message queue: 8
44 Wrote to message queue: 9
[all …]
/Zephyr-Core-3.4.0/samples/subsys/portability/cmsis_rtos_v2/timer_synchronization/
DREADME.rst11 The main thread creates a preemptive thread which writes message to message queue
32 Wrote to message queue: 5
33 Read from message queue: 5
35 Wrote to message queue: 6
36 Read from message queue: 6
38 Wrote to message queue: 7
39 Read from message queue: 7
41 Wrote to message queue: 8
42 Read from message queue: 8
44 Wrote to message queue: 9
[all …]
/Zephyr-Core-3.4.0/include/zephyr/tracing/
Dtracing.h326 #define sys_port_trace_k_work_submit_to_queue_enter(queue, work) argument
334 #define sys_port_trace_k_work_submit_to_queue_exit(queue, work, ret) argument
416 #define sys_port_trace_k_work_queue_init(queue) argument
422 #define sys_port_trace_k_work_queue_start_enter(queue) argument
428 #define sys_port_trace_k_work_queue_start_exit(queue) argument
434 #define sys_port_trace_k_work_queue_drain_enter(queue) argument
441 #define sys_port_trace_k_work_queue_drain_exit(queue, ret) argument
447 #define sys_port_trace_k_work_queue_unplug_enter(queue) argument
454 #define sys_port_trace_k_work_queue_unplug_exit(queue, ret) argument
476 #define sys_port_trace_k_work_schedule_for_queue_enter(queue, dwork, delay) argument
[all …]
Dtracking.h63 #define sys_port_track_k_work_queue_init(queue) argument
71 #define sys_port_track_k_queue_peek_tail(queue, ret) argument
72 #define sys_port_track_k_queue_peek_head(queue, ret) argument
73 #define sys_port_track_k_queue_cancel_wait(queue) argument
74 #define sys_port_track_k_queue_init(queue) \ argument
75 sys_track_k_queue_init(queue)
106 void sys_track_k_queue_init(struct k_queue *queue);
121 #define sys_port_track_k_work_queue_init(queue) argument
127 #define sys_port_track_k_queue_peek_tail(queue, ret) argument
128 #define sys_port_track_k_queue_peek_head(queue, ret) argument
[all …]
/Zephyr-Core-3.4.0/tests/kernel/queue/src/
Dtest_queue_fail.c25 static struct k_queue queue; in ZTEST() local
27 k_queue_init(&queue); in ZTEST()
29 zassert_is_null(k_queue_get(&queue, K_NO_WAIT), NULL); in ZTEST()
30 zassert_is_null(k_queue_get(&queue, TIMEOUT), NULL); in ZTEST()
62 static struct k_queue queue; in ZTEST() local
65 k_queue_init(&queue); in ZTEST()
69 zassert_true(k_queue_append_list(&queue, (uint32_t *)head, in ZTEST()
75 zassert_true(k_queue_append_list(&queue, (uint32_t *)head, in ZTEST()
79 k_queue_init(&queue); in ZTEST()
85 k_thread_create(&tdata, tstack, STACK_SIZE, tThread_entry, &queue, in ZTEST()
[all …]
Dtest_queue_contexts.c17 struct k_queue queue; variable
157 k_queue_init(&queue); in ZTEST()
158 tqueue_thread_thread(&queue); in ZTEST()
181 k_queue_init(&queue); in ZTEST()
182 tqueue_thread_isr(&queue); in ZTEST()
203 k_queue_init(&queue); in ZTEST()
204 tqueue_isr_thread(&queue); in ZTEST()
250 k_queue_init(&queue); in ZTEST()
252 tqueue_get_2threads(&queue); in ZTEST()
310 k_queue_init(&queue); in ZTEST()
[all …]
/Zephyr-Core-3.4.0/subsys/tracing/user/
Dtracing_user.h90 #define sys_port_trace_k_work_submit_to_queue_enter(queue, work) argument
91 #define sys_port_trace_k_work_submit_to_queue_exit(queue, work, ret) argument
103 #define sys_port_trace_k_work_queue_init(queue) argument
104 #define sys_port_trace_k_work_queue_start_enter(queue) argument
105 #define sys_port_trace_k_work_queue_start_exit(queue) argument
106 #define sys_port_trace_k_work_queue_drain_enter(queue) argument
107 #define sys_port_trace_k_work_queue_drain_exit(queue, ret) argument
108 #define sys_port_trace_k_work_queue_unplug_enter(queue) argument
109 #define sys_port_trace_k_work_queue_unplug_exit(queue, ret) argument
112 #define sys_port_trace_k_work_schedule_for_queue_enter(queue, dwork, delay) argument
[all …]
/Zephyr-Core-3.4.0/subsys/tracing/test/
Dtracing_test.h68 #define sys_port_trace_k_work_submit_to_queue_enter(queue, work) argument
69 #define sys_port_trace_k_work_submit_to_queue_exit(queue, work, ret) argument
81 #define sys_port_trace_k_work_queue_init(queue) argument
82 #define sys_port_trace_k_work_queue_start_enter(queue) argument
83 #define sys_port_trace_k_work_queue_start_exit(queue) argument
84 #define sys_port_trace_k_work_queue_drain_enter(queue) argument
85 #define sys_port_trace_k_work_queue_drain_exit(queue, ret) argument
86 #define sys_port_trace_k_work_queue_unplug_enter(queue) argument
87 #define sys_port_trace_k_work_queue_unplug_exit(queue, ret) argument
90 #define sys_port_trace_k_work_schedule_for_queue_enter(queue, dwork, delay) argument
[all …]
Dtracing_string_format_test.c390 void sys_trace_k_queue_init(struct k_queue *queue) in sys_trace_k_queue_init() argument
392 TRACING_STRING("%s: %p\n", __func__, queue); in sys_trace_k_queue_init()
395 void sys_trace_k_queue_cancel_wait(struct k_queue *queue) in sys_trace_k_queue_cancel_wait() argument
397 TRACING_STRING("%s: %p\n", __func__, queue); in sys_trace_k_queue_cancel_wait()
400 void sys_trace_k_queue_append_enter(struct k_queue *queue, void *data) in sys_trace_k_queue_append_enter() argument
402 TRACING_STRING("%s: %p\n", __func__, queue); in sys_trace_k_queue_append_enter()
405 void sys_trace_k_queue_append_exit(struct k_queue *queue, void *data) in sys_trace_k_queue_append_exit() argument
407 TRACING_STRING("%s: %p\n", __func__, queue); in sys_trace_k_queue_append_exit()
410 void sys_trace_k_queue_queue_insert_enter(struct k_queue *queue, bool alloc, void *data) in sys_trace_k_queue_queue_insert_enter() argument
412 TRACING_STRING("%s: %p\n", __func__, queue); in sys_trace_k_queue_queue_insert_enter()
[all …]
/Zephyr-Core-3.4.0/include/zephyr/sys/
Dp4wq.h43 struct k_p4wq *queue; member
70 struct rbtree queue; member
82 struct k_p4wq *queue; member
110 .queue = &name, \
137 .queue = name, \
150 void k_p4wq_init(struct k_p4wq *queue);
164 void k_p4wq_add_thread(struct k_p4wq *queue, struct k_thread *thread,
189 void k_p4wq_submit(struct k_p4wq *queue, struct k_p4wq_work *item);
201 bool k_p4wq_cancel(struct k_p4wq *queue, struct k_p4wq_work *item);
208 void k_p4wq_enable_static_thread(struct k_p4wq *queue, struct k_thread *thread,
/Zephyr-Core-3.4.0/subsys/tracing/ctf/
Dtracing_ctf.h77 #define sys_port_trace_k_work_submit_to_queue_enter(queue, work) argument
78 #define sys_port_trace_k_work_submit_to_queue_exit(queue, work, ret) argument
90 #define sys_port_trace_k_work_queue_init(queue) argument
91 #define sys_port_trace_k_work_queue_start_enter(queue) argument
92 #define sys_port_trace_k_work_queue_start_exit(queue) argument
93 #define sys_port_trace_k_work_queue_drain_enter(queue) argument
94 #define sys_port_trace_k_work_queue_drain_exit(queue, ret) argument
95 #define sys_port_trace_k_work_queue_unplug_enter(queue) argument
96 #define sys_port_trace_k_work_queue_unplug_exit(queue, ret) argument
99 #define sys_port_trace_k_work_schedule_for_queue_enter(queue, dwork, delay) argument
[all …]
/Zephyr-Core-3.4.0/drivers/ethernet/
Deth_sam_gmac.c132 #error Not enough RX buffers to allocate descriptors for each HW queue
244 static int rx_descriptors_init(Gmac *gmac, struct gmac_queue *queue);
245 static void tx_descriptors_init(Gmac *gmac, struct gmac_queue *queue);
246 static int nonpriority_queue_init(Gmac *gmac, struct gmac_queue *queue);
250 struct gmac_queue *queue) in set_receive_buf_queue_pointer() argument
253 if (queue->que_idx == GMAC_QUE_0) { in set_receive_buf_queue_pointer()
254 gmac->GMAC_RBQB = (uint32_t)queue->rx_desc_list.buf; in set_receive_buf_queue_pointer()
256 gmac->GMAC_RBQBAPQ[queue->que_idx - 1] = in set_receive_buf_queue_pointer()
257 (uint32_t)queue->rx_desc_list.buf; in set_receive_buf_queue_pointer()
271 static int priority_queue_init(Gmac *gmac, struct gmac_queue *queue) in priority_queue_init() argument
[all …]
/Zephyr-Core-3.4.0/subsys/tracing/sysview/
Dtracing_sysview.h131 #define sys_port_trace_k_work_submit_to_queue_enter(queue, work) \ argument
132 SEGGER_SYSVIEW_RecordU32x2(TID_WORK_SUBMIT_TO_QUEUE, (uint32_t)(uintptr_t)queue, \
135 #define sys_port_trace_k_work_submit_to_queue_exit(queue, work, ret) \ argument
167 #define sys_port_trace_k_work_queue_init(queue) \ argument
169 (uint32_t)(uintptr_t)queue)
171 #define sys_port_trace_k_work_queue_start_enter(queue) \ argument
172 SEGGER_SYSVIEW_RecordU32(TID_WORK_QUEUE_START, (uint32_t)(uintptr_t)queue)
174 #define sys_port_trace_k_work_queue_start_exit(queue) \ argument
177 #define sys_port_trace_k_work_queue_drain_enter(queue) \ argument
178 SEGGER_SYSVIEW_RecordU32(TID_WORK_QUEUE_DRAIN, (uint32_t)(uintptr_t)queue)
[all …]
/Zephyr-Core-3.4.0/doc/kernel/services/data_passing/
Dmessage_queues.rst6 A :dfn:`message queue` is a kernel object that implements a simple
7 message queue, allowing threads and ISRs to asynchronously send and receive
18 Each message queue is referenced by its memory address.
20 A message queue has the following key properties:
28 The message queue's ring buffer must be aligned to an N-byte boundary, where
33 A message queue must be initialized before it can be used.
36 A data item can be **sent** to a message queue by a thread or an ISR.
38 if one exists; otherwise the item is copied to the message queue's ring buffer,
40 *must* equal the message queue's data item size.
48 A data item can be **received** from a message queue by a thread.
[all …]
/Zephyr-Core-3.4.0/drivers/i2c/
DKconfig.sam_twihs17 int "Submission queue size for blocking calls"
21 submission queue. The queue depth determines the number of possible i2c_msg
27 int "Completion queue size for blocking calls"
31 submission queue. The queue depth determines the number of possible i2c_msg
/Zephyr-Core-3.4.0/drivers/sensor/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-Core-3.4.0/tests/posix/common/src/
Dmqueue.c24 char queue[16] = "server"; variable
32 mqd = mq_open(queue, O_WRONLY); in sender_thread()
51 mqd = mq_open(queue, O_RDONLY); in receiver_thread()
75 mqd = mq_open(queue, flags, mode, &attrs); in ZTEST()
104 zassert_false(mq_unlink(queue), "Not able to unlink Queue"); in ZTEST()
/Zephyr-Core-3.4.0/modules/hal_infineon/abstraction-rtos/source/COMPONENT_ZEPHYR/
Dcyabs_rtos_zephyr.c632 cy_rslt_t cy_rtos_init_queue(cy_queue_t *queue, size_t length, size_t itemsize) in cy_rtos_init_queue() argument
637 if (queue == NULL) { in cy_rtos_init_queue()
641 status_internal = k_msgq_alloc_init(queue, itemsize, length); in cy_rtos_init_queue()
648 cy_rslt_t cy_rtos_put_queue(cy_queue_t *queue, const void *item_ptr, cy_time_t timeout_ms, in cy_rtos_put_queue() argument
656 if ((queue == NULL) || (item_ptr == NULL)) { in cy_rtos_put_queue()
671 status_internal = k_msgq_put(queue, item_ptr, k_timeout); in cy_rtos_put_queue()
678 cy_rslt_t cy_rtos_get_queue(cy_queue_t *queue, void *item_ptr, cy_time_t timeout_ms, bool in_isr) in cy_rtos_get_queue() argument
685 if ((queue == NULL) || (item_ptr == NULL)) { in cy_rtos_get_queue()
700 status_internal = k_msgq_get(queue, item_ptr, k_timeout); in cy_rtos_get_queue()
707 cy_rslt_t cy_rtos_count_queue(cy_queue_t *queue, size_t *num_waiting) in cy_rtos_count_queue() argument
[all …]
/Zephyr-Core-3.4.0/drivers/sensor/ite_vcmp_it8xxx2/
DKconfig25 bool "ITE it8xxx2 voltage comparator threshold detection uses internal work queue"
27 Threshold detection ISR utilizes system work queue for calling
28 trigger handlers; set this option to use dedicated work queue instead.
33 int "ITE it8xxx2 voltage comparator threshold detection work queue priority"
40 int "ITE it8xxx2 voltage comparator threshold detection work queue stack size"

1234567