Home
last modified time | relevance | path

Searched refs:waiter (Results 1 – 25 of 58) sorted by relevance

123

/linux-6.1.9/drivers/gpu/host1x/
Dintr.c37 static bool add_waiter_to_queue(struct host1x_waitlist *waiter, in add_waiter_to_queue() argument
41 u32 thresh = waiter->thresh; in add_waiter_to_queue()
45 list_add(&waiter->list, &pos->list); in add_waiter_to_queue()
49 list_add(&waiter->list, queue); in add_waiter_to_queue()
61 struct host1x_waitlist *waiter, *next, *prev; in remove_completed_waiters() local
63 list_for_each_entry_safe(waiter, next, head, list) { in remove_completed_waiters()
64 if ((s32)(waiter->thresh - sync) > 0) in remove_completed_waiters()
67 dest = completed + waiter->action; in remove_completed_waiters()
70 if (waiter->action == HOST1X_INTR_ACTION_SUBMIT_COMPLETE && in remove_completed_waiters()
74 if (prev->data == waiter->data) { in remove_completed_waiters()
[all …]
Dfence.c28 struct host1x_waitlist *waiter; member
73 sf->waiter, &sf->waiter_ref); in host1x_syncpt_fence_enable_signaling()
81 sf->waiter = NULL; in host1x_syncpt_fence_enable_signaling()
96 if (sf->waiter) in host1x_syncpt_fence_release()
97 kfree(sf->waiter); in host1x_syncpt_fence_release()
154 fence->waiter = kzalloc(sizeof(*fence->waiter), GFP_KERNEL); in host1x_fence_create()
155 if (!fence->waiter) { in host1x_fence_create()
Dsyncpt.c235 struct host1x_waitlist *waiter; in host1x_syncpt_wait() local
250 waiter = kzalloc(sizeof(*waiter), GFP_KERNEL); in host1x_syncpt_wait()
251 if (!waiter) { in host1x_syncpt_wait()
259 &wq, waiter, &ref); in host1x_syncpt_wait()
/linux-6.1.9/kernel/locking/
Dmutex-debug.c28 void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter) in debug_mutex_lock_common() argument
30 memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter)); in debug_mutex_lock_common()
31 waiter->magic = waiter; in debug_mutex_lock_common()
32 INIT_LIST_HEAD(&waiter->list); in debug_mutex_lock_common()
33 waiter->ww_ctx = MUTEX_POISON_WW_CTX; in debug_mutex_lock_common()
36 void debug_mutex_wake_waiter(struct mutex *lock, struct mutex_waiter *waiter) in debug_mutex_wake_waiter() argument
40 DEBUG_LOCKS_WARN_ON(waiter->magic != waiter); in debug_mutex_wake_waiter()
41 DEBUG_LOCKS_WARN_ON(list_empty(&waiter->list)); in debug_mutex_wake_waiter()
44 void debug_mutex_free_waiter(struct mutex_waiter *waiter) in debug_mutex_free_waiter() argument
46 DEBUG_LOCKS_WARN_ON(!list_empty(&waiter->list)); in debug_mutex_free_waiter()
[all …]
Drtmutex.c35 static inline int __ww_mutex_add_waiter(struct rt_mutex_waiter *waiter, in __ww_mutex_add_waiter() argument
53 struct rt_mutex_waiter *waiter, in __ww_mutex_check_kill() argument
337 waiter_update_prio(struct rt_mutex_waiter *waiter, struct task_struct *task) in waiter_update_prio() argument
339 waiter->prio = __waiter_prio(task); in waiter_update_prio()
340 waiter->deadline = task->dl.deadline; in waiter_update_prio()
385 static inline bool rt_mutex_steal(struct rt_mutex_waiter *waiter, in rt_mutex_steal() argument
388 if (rt_mutex_waiter_less(waiter, top_waiter)) in rt_mutex_steal()
396 if (rt_prio(waiter->prio) || dl_prio(waiter->prio)) in rt_mutex_steal()
399 return rt_mutex_waiter_equal(waiter, top_waiter); in rt_mutex_steal()
435 rt_mutex_enqueue(struct rt_mutex_base *lock, struct rt_mutex_waiter *waiter) in rt_mutex_enqueue() argument
[all …]
Drtmutex_common.h68 struct rt_mutex_waiter *waiter,
71 struct rt_mutex_waiter *waiter,
75 struct rt_mutex_waiter *waiter);
77 struct rt_mutex_waiter *waiter);
104 struct rt_mutex_waiter *waiter) in rt_mutex_waiter_is_top_waiter() argument
108 return rb_entry(leftmost, struct rt_mutex_waiter, tree_entry) == waiter; in rt_mutex_waiter_is_top_waiter()
178 static inline void debug_rt_mutex_init_waiter(struct rt_mutex_waiter *waiter) in debug_rt_mutex_init_waiter() argument
181 memset(waiter, 0x11, sizeof(*waiter)); in debug_rt_mutex_init_waiter()
184 static inline void debug_rt_mutex_free_waiter(struct rt_mutex_waiter *waiter) in debug_rt_mutex_free_waiter() argument
187 memset(waiter, 0x22, sizeof(*waiter)); in debug_rt_mutex_free_waiter()
[all …]
Dmutex.h25 struct mutex_waiter *waiter);
27 struct mutex_waiter *waiter);
28 extern void debug_mutex_free_waiter(struct mutex_waiter *waiter);
30 struct mutex_waiter *waiter,
32 extern void debug_mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter,
38 # define debug_mutex_lock_common(lock, waiter) do { } while (0) argument
39 # define debug_mutex_wake_waiter(lock, waiter) do { } while (0) argument
40 # define debug_mutex_free_waiter(waiter) do { } while (0) argument
41 # define debug_mutex_add_waiter(lock, waiter, ti) do { } while (0) argument
42 # define debug_mutex_remove_waiter(lock, waiter, ti) do { } while (0) argument
Dmutex.c195 static inline bool __mutex_waiter_is_first(struct mutex *lock, struct mutex_waiter *waiter) in __mutex_waiter_is_first() argument
197 return list_first_entry(&lock->wait_list, struct mutex_waiter, list) == waiter; in __mutex_waiter_is_first()
205 __mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, in __mutex_add_waiter() argument
208 debug_mutex_add_waiter(lock, waiter, current); in __mutex_add_waiter()
210 list_add_tail(&waiter->list, list); in __mutex_add_waiter()
211 if (__mutex_waiter_is_first(lock, waiter)) in __mutex_add_waiter()
216 __mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter) in __mutex_remove_waiter() argument
218 list_del(&waiter->list); in __mutex_remove_waiter()
222 debug_mutex_remove_waiter(lock, waiter, current); in __mutex_remove_waiter()
305 struct mutex_waiter *waiter) in ww_mutex_spin_on_owner() argument
[all …]
Drwsem.c373 rwsem_add_waiter(struct rw_semaphore *sem, struct rwsem_waiter *waiter) in rwsem_add_waiter() argument
376 list_add_tail(&waiter->list, &sem->wait_list); in rwsem_add_waiter()
389 rwsem_del_waiter(struct rw_semaphore *sem, struct rwsem_waiter *waiter) in rwsem_del_waiter() argument
392 list_del(&waiter->list); in rwsem_del_waiter()
418 struct rwsem_waiter *waiter, *tmp; in rwsem_mark_wake() local
428 waiter = rwsem_first_waiter(sem); in rwsem_mark_wake()
430 if (waiter->type == RWSEM_WAITING_FOR_WRITE) { in rwsem_mark_wake()
439 wake_q_add(wake_q, waiter->task); in rwsem_mark_wake()
468 if (time_after(jiffies, waiter->timeout)) { in rwsem_mark_wake()
473 waiter->handoff_set = true; in rwsem_mark_wake()
[all …]
Dsemaphore.c212 struct semaphore_waiter waiter; in ___down_common() local
214 list_add_tail(&waiter.list, &sem->wait_list); in ___down_common()
215 waiter.task = current; in ___down_common()
216 waiter.up = false; in ___down_common()
227 if (waiter.up) in ___down_common()
232 list_del(&waiter.list); in ___down_common()
236 list_del(&waiter.list); in ___down_common()
274 struct semaphore_waiter *waiter = list_first_entry(&sem->wait_list, in __up() local
276 list_del(&waiter->list); in __up()
277 waiter->up = true; in __up()
[all …]
Drtmutex_api.c293 struct rt_mutex_waiter *waiter, in __rt_mutex_start_proxy_lock() argument
304 ret = task_blocks_on_rt_mutex(lock, waiter, task, NULL, in __rt_mutex_start_proxy_lock()
340 struct rt_mutex_waiter *waiter, in rt_mutex_start_proxy_lock() argument
346 ret = __rt_mutex_start_proxy_lock(lock, waiter, task); in rt_mutex_start_proxy_lock()
348 remove_waiter(lock, waiter); in rt_mutex_start_proxy_lock()
373 struct rt_mutex_waiter *waiter) in rt_mutex_wait_proxy_lock() argument
380 ret = rt_mutex_slowlock_block(lock, NULL, TASK_INTERRUPTIBLE, to, waiter); in rt_mutex_wait_proxy_lock()
412 struct rt_mutex_waiter *waiter) in rt_mutex_cleanup_proxy_lock() argument
428 try_to_take_rt_mutex(lock, current, waiter); in rt_mutex_cleanup_proxy_lock()
434 remove_waiter(lock, waiter); in rt_mutex_cleanup_proxy_lock()
[all …]
Dww_mutex.h53 __ww_waiter_add(struct mutex *lock, struct mutex_waiter *waiter, struct mutex_waiter *pos) in __ww_waiter_add() argument
58 __mutex_add_waiter(lock, waiter, p); in __ww_waiter_add()
130 __ww_waiter_add(struct rt_mutex *lock, struct rt_mutex_waiter *waiter, struct rt_mutex_waiter *pos) in __ww_waiter_add() argument
277 __ww_mutex_die(struct MUTEX *lock, struct MUTEX_WAITER *waiter, in __ww_mutex_die() argument
283 if (waiter->ww_ctx->acquired > 0 && __ww_ctx_less(waiter->ww_ctx, ww_ctx)) { in __ww_mutex_die()
285 debug_mutex_wake_waiter(lock, waiter); in __ww_mutex_die()
287 wake_up_process(waiter->task); in __ww_mutex_die()
441 __ww_mutex_check_kill(struct MUTEX *lock, struct MUTEX_WAITER *waiter, in __ww_mutex_check_kill() argument
465 for (cur = __ww_waiter_prev(lock, waiter); cur; in __ww_mutex_check_kill()
489 __ww_mutex_add_waiter(struct MUTEX_WAITER *waiter, in __ww_mutex_add_waiter() argument
[all …]
/linux-6.1.9/drivers/tty/
Dtty_ldsem.c76 struct ldsem_waiter *waiter, *next; in __ldsem_wake_readers() local
94 list_for_each_entry_safe(waiter, next, &sem->read_wait, list) { in __ldsem_wake_readers()
95 tsk = waiter->task; in __ldsem_wake_readers()
96 smp_store_release(&waiter->task, NULL); in __ldsem_wake_readers()
121 struct ldsem_waiter *waiter; in __ldsem_wake_writer() local
123 waiter = list_entry(sem->write_wait.next, struct ldsem_waiter, list); in __ldsem_wake_writer()
124 wake_up_process(waiter->task); in __ldsem_wake_writer()
158 struct ldsem_waiter waiter; in down_read_failed() local
180 list_add_tail(&waiter.list, &sem->read_wait); in down_read_failed()
183 waiter.task = current; in down_read_failed()
[all …]
/linux-6.1.9/lib/
Dklist.c185 struct klist_waiter *waiter, *tmp; in klist_release() local
191 list_for_each_entry_safe(waiter, tmp, &klist_remove_waiters, list) { in klist_release()
192 if (waiter->node != n) in klist_release()
195 list_del(&waiter->list); in klist_release()
196 waiter->woken = 1; in klist_release()
198 wake_up_process(waiter->process); in klist_release()
240 struct klist_waiter waiter; in klist_remove() local
242 waiter.node = n; in klist_remove()
243 waiter.process = current; in klist_remove()
244 waiter.woken = 0; in klist_remove()
[all …]
/linux-6.1.9/tools/testing/selftests/filesystems/epoll/
Depoll_wakeup_test.c23 pthread_t waiter; member
47 pthread_kill(ctx->waiter, SIGUSR1); in kill_timeout()
489 ASSERT_EQ(pthread_create(&ctx.waiter, NULL, waiter_entry1a, &ctx), 0); in TEST()
495 ASSERT_EQ(pthread_join(ctx.waiter, NULL), 0); in TEST()
532 ASSERT_EQ(pthread_create(&ctx.waiter, NULL, waiter_entry1a, &ctx), 0); in TEST()
538 ASSERT_EQ(pthread_join(ctx.waiter, NULL), 0); in TEST()
579 ASSERT_EQ(pthread_create(&ctx.waiter, NULL, waiter_entry2a, &ctx), 0); in TEST()
585 ASSERT_EQ(pthread_join(ctx.waiter, NULL), 0); in TEST()
628 ASSERT_EQ(pthread_create(&ctx.waiter, NULL, waiter_entry1a, &ctx), 0); in TEST()
634 ASSERT_EQ(pthread_join(ctx.waiter, NULL), 0); in TEST()
[all …]
/linux-6.1.9/tools/testing/selftests/futex/functional/
Dfutex_requeue_pi_signal_restart.c122 pthread_t waiter; in main() local
158 res = create_rt_thread(&waiter, waiterfn, NULL, SCHED_FIFO, 1); in main()
177 pthread_kill(waiter, SIGUSR1); in main()
208 pthread_kill(waiter, SIGUSR1); in main()
210 pthread_join(waiter, NULL); in main()
Dfutex_wait.c53 pthread_t waiter; in main() local
81 if (pthread_create(&waiter, NULL, waiterfn, (void *) &flags)) in main()
109 if (pthread_create(&waiter, NULL, waiterfn, NULL)) in main()
148 if (pthread_create(&waiter, NULL, waiterfn, NULL)) in main()
Dfutex_requeue.c43 pthread_t waiter[10]; in main() local
76 if (pthread_create(&waiter[0], NULL, waiterfn, NULL)) in main()
108 if (pthread_create(&waiter[i], NULL, waiterfn, NULL)) in main()
/linux-6.1.9/Documentation/locking/
Dfutex-requeue-pi.rst20 implementation would wake the highest-priority waiter, and leave the
92 The requeue code cannot simply wake the waiter and leave it to
94 requeue call returning to user space and the waiter waking and
100 of the waiter and to enqueue the waiter on a contended rt_mutex.
104 FUTEX_WAIT_REQUEUE_PI is called by the waiter (pthread_cond_wait()
116 PI futex on behalf of the top waiter. If it can, this waiter is
120 task as a waiter on the underlying rt_mutex. It is possible that
122 waiter is woken to finish the acquisition of the lock.
Drt-mutex-design.rst100 waiter
101 - A waiter is a struct that is stored on the stack of a blocked
102 process. Since the scope of the waiter is within the code for
104 the waiter on the process's stack (local variable). This
110 waiter is sometimes used in reference to the task that is waiting
111 on a mutex. This is the same as waiter->task.
116 top waiter
119 top pi waiter
360 pi waiter to its own normal/deadline priority and take the higher one.
377 by the task, so we only need to compare the priority of that top pi waiter
[all …]
Drt-mutex.rst20 priority waiter until the rt-mutex is released. If the temporarily
32 The enqueueing of the waiters into the rtmutex waiter tree is done in
34 rtmutex, only the top priority waiter is enqueued into the owner's
36 the top priority waiter of a task changes (for example it timed out or
56 NULL 1 lock is free and has waiters and the top waiter
/linux-6.1.9/fs/
Dlocks.c641 static void locks_insert_global_blocked(struct file_lock *waiter) in locks_insert_global_blocked() argument
645 hash_add(blocked_hash, &waiter->fl_link, posix_owner_key(waiter)); in locks_insert_global_blocked()
648 static void locks_delete_global_blocked(struct file_lock *waiter) in locks_delete_global_blocked() argument
652 hash_del(&waiter->fl_link); in locks_delete_global_blocked()
660 static void __locks_delete_block(struct file_lock *waiter) in __locks_delete_block() argument
662 locks_delete_global_blocked(waiter); in __locks_delete_block()
663 list_del_init(&waiter->fl_blocked_member); in __locks_delete_block()
669 struct file_lock *waiter; in __locks_wake_up_blocks() local
671 waiter = list_first_entry(&blocker->fl_blocked_requests, in __locks_wake_up_blocks()
673 __locks_delete_block(waiter); in __locks_wake_up_blocks()
[all …]
/linux-6.1.9/drivers/staging/vc04_services/interface/vchiq_arm/
Dvchiq_dev.c292 struct bulk_waiter_node *waiter = NULL, *iter; in vchiq_irq_queue_bulk_tx_rx() local
302 waiter = kzalloc(sizeof(*waiter), GFP_KERNEL); in vchiq_irq_queue_bulk_tx_rx()
303 if (!waiter) { in vchiq_irq_queue_bulk_tx_rx()
308 userdata = &waiter->bulk_waiter; in vchiq_irq_queue_bulk_tx_rx()
315 waiter = iter; in vchiq_irq_queue_bulk_tx_rx()
320 if (!waiter) { in vchiq_irq_queue_bulk_tx_rx()
327 "found bulk_waiter %pK for pid %d", waiter, current->pid); in vchiq_irq_queue_bulk_tx_rx()
328 userdata = &waiter->bulk_waiter; in vchiq_irq_queue_bulk_tx_rx()
336 if (!waiter) { in vchiq_irq_queue_bulk_tx_rx()
342 !waiter->bulk_waiter.bulk) { in vchiq_irq_queue_bulk_tx_rx()
[all …]
Dvchiq_arm.c714 struct bulk_waiter_node *waiter, *next; in free_bulk_waiter() local
716 list_for_each_entry_safe(waiter, next, in free_bulk_waiter()
718 list_del(&waiter->list); in free_bulk_waiter()
720 waiter, waiter->pid); in free_bulk_waiter()
721 kfree(waiter); in free_bulk_waiter()
919 struct bulk_waiter_node *waiter = NULL, *iter; in vchiq_blocking_bulk_transfer() local
931 waiter = iter; in vchiq_blocking_bulk_transfer()
937 if (waiter) { in vchiq_blocking_bulk_transfer()
938 struct vchiq_bulk *bulk = waiter->bulk_waiter.bulk; in vchiq_blocking_bulk_transfer()
954 waiter = kzalloc(sizeof(*waiter), GFP_KERNEL); in vchiq_blocking_bulk_transfer()
[all …]
/linux-6.1.9/drivers/gpu/drm/amd/amdkfd/
Dkfd_events.c263 struct kfd_event_waiter *waiter; in destroy_event() local
267 list_for_each_entry(waiter, &ev->wq.head, wait.entry) in destroy_event()
268 WRITE_ONCE(waiter->event, NULL); in destroy_event()
624 struct kfd_event_waiter *waiter; in set_event() local
633 list_for_each_entry(waiter, &ev->wq.head, wait.entry) in set_event()
634 WRITE_ONCE(waiter->activated, true); in set_event()
796 struct kfd_event_waiter *waiter, in init_event_waiter() argument
805 waiter->event = ev; in init_event_waiter()
806 waiter->activated = ev->signaled; in init_event_waiter()
808 if (!waiter->activated) in init_event_waiter()
[all …]

123