/Zephyr-latest/kernel/include/ |
D | ksched.h | 54 struct k_thread *z_unpend1_no_timeout(_wait_q_t *wait_q); 56 _wait_q_t *wait_q, k_timeout_t timeout); 57 void z_pend_thread(struct k_thread *thread, _wait_q_t *wait_q, 62 int z_unpend_all(_wait_q_t *wait_q); 174 static ALWAYS_INLINE struct k_thread *z_unpend_first_thread(_wait_q_t *wait_q) in z_unpend_first_thread() argument 182 thread = _priq_wait_best(&wait_q->waitq); in z_unpend_first_thread() 228 bool z_sched_wake(_wait_q_t *wait_q, int swap_retval, void *swap_data); 254 static inline bool z_sched_wake_all(_wait_q_t *wait_q, int swap_retval, in z_sched_wake_all() argument 259 while (z_sched_wake(wait_q, swap_retval, swap_data)) { in z_sched_wake_all() 288 _wait_q_t *wait_q, k_timeout_t timeout, void **data); [all …]
|
/Zephyr-latest/kernel/ |
D | condvar.c | 23 z_waitq_init(&condvar->wait_q); in z_impl_k_condvar_init() 50 struct k_thread *thread = z_unpend_first_thread(&condvar->wait_q); in z_impl_k_condvar_signal() 87 for (pending_thread = z_unpend_first_thread(&condvar->wait_q); pending_thread != NULL; in z_impl_k_condvar_broadcast() 88 pending_thread = z_unpend_first_thread(&condvar->wait_q)) { in z_impl_k_condvar_broadcast() 120 ret = z_pend_curr(&lock, key, &condvar->wait_q, timeout); in z_impl_k_condvar_wait()
|
D | sched.c | 40 static void add_to_waitq_locked(struct k_thread *thread, _wait_q_t *wait_q); 563 static void add_to_waitq_locked(struct k_thread *thread, _wait_q_t *wait_q) in add_to_waitq_locked() argument 570 if (wait_q != NULL) { in add_to_waitq_locked() 571 thread->base.pended_on = wait_q; in add_to_waitq_locked() 572 _priq_wait_add(&wait_q->waitq, thread); in add_to_waitq_locked() 583 static void pend_locked(struct k_thread *thread, _wait_q_t *wait_q, in pend_locked() argument 587 __ASSERT_NO_MSG(wait_q == NULL || arch_mem_coherent(wait_q)); in pend_locked() 589 add_to_waitq_locked(thread, wait_q); in pend_locked() 593 void z_pend_thread(struct k_thread *thread, _wait_q_t *wait_q, in z_pend_thread() argument 598 pend_locked(thread, wait_q, timeout); in z_pend_thread() [all …]
|
D | kheap.c | 17 z_waitq_init(&heap->wait_q); in k_heap_init() 41 lnkr_is_pinned((uint8_t *)&heap->wait_q) && in statics_init() 98 (void) z_pend_curr(&heap->lock, key, &heap->wait_q, timeout); in k_heap_aligned_alloc() 158 (void) z_pend_curr(&heap->lock, key, &heap->wait_q, timeout); in k_heap_realloc() 175 if (IS_ENABLED(CONFIG_MULTITHREADING) && (z_unpend_all(&heap->wait_q) != 0)) { in k_heap_free()
|
D | sem.c | 62 z_waitq_init(&sem->wait_q); in z_impl_k_sem_init() 104 thread = z_unpend_first_thread(&sem->wait_q); in z_impl_k_sem_give() 158 ret = z_pend_curr(&lock, key, &sem->wait_q, timeout); in z_impl_k_sem_take() 172 thread = z_unpend_first_thread(&sem->wait_q); in z_impl_k_sem_reset()
|
D | msg_q.c | 50 z_waitq_init(&msgq->wait_q); in k_msgq_init() 107 CHECKIF(z_waitq_head(&msgq->wait_q) != NULL) { in k_msgq_cleanup() 138 pending_thread = z_unpend_first_thread(&msgq->wait_q); in z_impl_k_msgq_put() 174 result = z_pend_curr(&msgq->lock, key, &msgq->wait_q, timeout); in z_impl_k_msgq_put() 238 pending_thread = z_unpend_first_thread(&msgq->wait_q); in z_impl_k_msgq_get() 272 result = z_pend_curr(&msgq->lock, key, &msgq->wait_q, timeout); in z_impl_k_msgq_get() 386 for (pending_thread = z_unpend_first_thread(&msgq->wait_q); pending_thread != NULL; in z_impl_k_msgq_purge() 387 pending_thread = z_unpend_first_thread(&msgq->wait_q)) { in z_impl_k_msgq_purge()
|
D | stack.c | 30 z_waitq_init(&stack->wait_q); in k_stack_init() 84 CHECKIF(z_waitq_head(&stack->wait_q) != NULL) { in k_stack_cleanup() 114 first_pending_thread = z_unpend_first_thread(&stack->wait_q); in z_impl_k_stack_push() 178 result = z_pend_curr(&stack->lock, key, &stack->wait_q, timeout); in z_impl_k_stack_pop()
|
D | futex.c | 42 thread = z_unpend_first_thread(&futex_data->wait_q); in z_impl_k_futex_wake() 84 key, &futex_data->wait_q, timeout); in z_impl_k_futex_wait()
|
D | pipes.c | 47 z_waitq_init(&pipe->wait_q.writers); in k_pipe_init() 48 z_waitq_init(&pipe->wait_q.readers); in k_pipe_init() 165 CHECKIF((z_waitq_head(&pipe->wait_q.readers) != NULL) || in k_pipe_cleanup() 166 (z_waitq_head(&pipe->wait_q.writers) != NULL)) { in k_pipe_cleanup() 248 _wait_q_t *wait_q, in pipe_waiter_list_populate() argument 257 (void) z_sched_waitq_walk(wait_q, pipe_walk_op, &walk_data); in pipe_waiter_list_populate() 415 &pipe->wait_q.readers, in z_impl_k_pipe_put() 493 z_sched_wait(&pipe->lock, key, &pipe->wait_q.writers, timeout, NULL); in z_impl_k_pipe_put() 565 &pipe->wait_q.writers, in pipe_get_internal() 640 &pipe->wait_q.writers, in pipe_get_internal() [all …]
|
D | mutex.c | 60 z_waitq_init(&mutex->wait_q); in z_impl_k_mutex_init() 156 int got_mutex = z_pend_curr(&lock, key, &mutex->wait_q, timeout); in z_impl_k_mutex_lock() 179 struct k_thread *waiter = z_waitq_head(&mutex->wait_q); in z_impl_k_mutex_lock() 257 new_owner = z_unpend_first_thread(&mutex->wait_q); in z_impl_k_mutex_unlock()
|
D | timer.c | 96 thread = z_waitq_head(&timer->wait_q); in z_timer_expiration_handler() 122 z_waitq_init(&timer->wait_q); in k_timer_init() 209 struct k_thread *pending_thread = z_unpend1_no_timeout(&timer->wait_q); in z_impl_k_timer_stop() 283 (void)z_pend_curr(&lock, key, &timer->wait_q, K_FOREVER); in z_impl_k_timer_status_sync()
|
D | queue.c | 62 z_waitq_init(&queue->wait_q); in z_impl_k_queue_init() 104 first_pending_thread = z_unpend_first_thread(&queue->wait_q); in z_impl_k_queue_cancel_wait() 134 first_pending_thread = z_unpend_first_thread(&queue->wait_q); in queue_insert() 262 thread = z_unpend_first_thread(&queue->wait_q); in k_queue_append_list() 268 thread = z_unpend_first_thread(&queue->wait_q); in k_queue_append_list() 346 int ret = z_pend_curr(&queue->lock, key, &queue->wait_q, timeout); in z_impl_k_queue_get()
|
D | events.c | 59 z_waitq_init(&event->wait_q); in z_impl_k_event_init() 160 z_sched_waitq_walk(&event->wait_q, event_walk_op, &data); in k_event_post_internal() 294 if (z_pend_curr(&event->lock, key, &event->wait_q, timeout) == 0) { in k_event_wait_internal()
|
D | mem_slab.c | 199 z_waitq_init(&slab->wait_q); in k_mem_slab_init() 253 result = z_pend_curr(&slab->lock, key, &slab->wait_q, timeout); in k_mem_slab_alloc() 282 struct k_thread *pending_thread = z_unpend_first_thread(&slab->wait_q); in k_mem_slab_free()
|
D | poll.c | 333 static _wait_q_t wait_q = Z_WAIT_Q_INIT(&wait_q); in z_impl_k_poll() local 335 int swap_rc = z_pend_curr(&lock, key, &wait_q, timeout); in z_impl_k_poll()
|
D | Kconfig | 356 The wait_q abstraction used in IPC primitives to pend 362 bool "Use scalable wait_q implementation" 364 When selected, the wait_q will be implemented with a 374 bool "Simple linked-list wait_q" 376 When selected, the wait_q will be implemented with a
|
/Zephyr-latest/include/zephyr/ |
D | kernel.h | 1558 _wait_q_t wait_q; member 1589 .wait_q = Z_WAIT_Q_INIT(&obj.wait_q), \ 1959 _wait_q_t wait_q; member 1974 .wait_q = Z_WAIT_Q_INIT(&obj.wait_q), \ 2260 _wait_q_t wait_q; member 2266 .wait_q = Z_WAIT_Q_INIT(&obj.wait_q) \ 2328 _wait_q_t wait_q; member 2342 .wait_q = Z_WAIT_Q_INIT(&obj.wait_q), \ 2870 _wait_q_t wait_q; member 2885 .wait_q = Z_WAIT_Q_INIT(&(obj).wait_q), \ [all …]
|
D | kernel_structs.h | 280 #define Z_WAIT_Q_INIT(wait_q) { { { .lessthan_fn = z_priq_rb_lessthan } } } argument 288 #define Z_WAIT_Q_INIT(wait_q) { SYS_DLIST_STATIC_INIT(&(wait_q)->waitq) } argument
|
/Zephyr-latest/tests/benchmarks/wait_queues/src/ |
D | main.c | 32 static _wait_q_t wait_q; variable 234 z_waitq_init(&wait_q); in main() 243 test_decreasing_priority(&wait_q, CONFIG_BENCHMARK_NUM_THREADS); in main() 281 test_increasing_priority(&wait_q, CONFIG_BENCHMARK_NUM_THREADS); in main()
|
/Zephyr-latest/doc/kernel/services/scheduling/ |
D | index.rst | 101 The wait_q abstraction used in IPC primitives to pend threads for later wakeup 105 * Scalable wait_q implementation (:kconfig:option:`CONFIG_WAITQ_SCALABLE`) 107 When selected, the wait_q will be implemented with a balanced tree. Choose 115 * Simple linked-list wait_q (:kconfig:option:`CONFIG_WAITQ_DUMB`) 117 When selected, the wait_q will be implemented with a doubly-linked list.
|
/Zephyr-latest/tests/kernel/events/event_api/src/ |
D | test_event_apis.c | 71 thread = z_waitq_head(&event.wait_q); in ZTEST()
|
/Zephyr-latest/doc/kernel/services/timing/ |
D | clocks.rst | 151 example: a :c:struct:`wait_q` struct, or a :c:type:`k_tid_t` thread struct).
|