Lines Matching refs:to

4 Requeueing of tasks from a non-PI futex to a PI futex requires
5 special handling in order to ensure the underlying rt_mutex is never
8 brevity, this action will be referred to as "requeue_pi" throughout
16 pthread_cond_broadcast() must resort to waking all the tasks waiting
17 on a pthread_condvar and letting them try to sort out which task
18 gets to run first in classic thundering-herd formation. An ideal
20 rest to the natural wakeup inherent in unlocking the mutex
47 has waiters. Note that pthread_cond_wait() attempts to lock the
48 mutex only after it has returned to user space. This will leave the
52 In order to support PI-aware pthread_condvar's, the kernel needs to
53 be able to requeue tasks to PI futexes. This support implies that
54 upon a successful futex_wait system call, the caller would return to
88 In order to ensure the rt_mutex has an owner if it has waiters, it
90 to be able to acquire the rt_mutex before returning to user space.
91 The requeue code cannot simply wake the waiter and leave it to
93 requeue call returning to user space and the waiter waking and
94 starting to run. This is especially true in the uncontended case.
98 allow the requeue code to acquire an uncontended rt_mutex on behalf
99 of the waiter and to enqueue the waiter on a contended rt_mutex.
100 Two new system calls provide the kernel<->user interface to
104 and pthread_cond_timedwait()) to block on the initial futex and wait
105 to be requeued to a PI-aware futex. The implementation is the
107 futex_lock_pi(), with some extra logic to check for the additional
111 (pthread_cond_broadcast() and pthread_cond_signal()) to requeue and
114 requeueing, futex_requeue() attempts to acquire the requeue target
116 woken. futex_requeue() then proceeds to requeue the remaining
117 nr_wake+nr_requeue tasks to the PI futex, calling
118 rt_mutex_start_proxy_lock() prior to each requeue to prepare the
121 waiter is woken to finish the acquisition of the lock.
125 requeue up to nr_wake + nr_requeue tasks. It will wake only as many
129 mutex prior to making the call. FUTEX_CMP_REQUEUE_PI requires that