Lines Matching refs:hb

320 static inline void hb_waiters_inc(struct futex_hash_bucket *hb)  in hb_waiters_inc()  argument
323 atomic_inc(&hb->waiters); in hb_waiters_inc()
335 static inline void hb_waiters_dec(struct futex_hash_bucket *hb) in hb_waiters_dec() argument
338 atomic_dec(&hb->waiters); in hb_waiters_dec()
342 static inline int hb_waiters_pending(struct futex_hash_bucket *hb) in hb_waiters_pending() argument
349 return atomic_read(&hb->waiters); in hb_waiters_pending()
696 static struct futex_q *futex_top_waiter(struct futex_hash_bucket *hb, in futex_top_waiter() argument
701 plist_for_each_entry(this, &hb->chain, list) { in futex_top_waiter()
829 struct futex_hash_bucket *hb; in exit_pi_state_list() local
844 hb = hash_futex(&key); in exit_pi_state_list()
864 spin_lock(&hb->lock); in exit_pi_state_list()
874 spin_unlock(&hb->lock); in exit_pi_state_list()
886 spin_unlock(&hb->lock); in exit_pi_state_list()
1287 struct futex_hash_bucket *hb, in lookup_pi_state() argument
1291 struct futex_q *top_waiter = futex_top_waiter(hb, key); in lookup_pi_state()
1347 static int futex_lock_pi_atomic(u32 __user *uaddr, struct futex_hash_bucket *hb, in futex_lock_pi_atomic() argument
1381 top_waiter = futex_top_waiter(hb, key); in futex_lock_pi_atomic()
1433 struct futex_hash_bucket *hb; in __unqueue_futex() local
1439 hb = container_of(q->lock_ptr, struct futex_hash_bucket, lock); in __unqueue_futex()
1440 plist_del(&q->list, &hb->chain); in __unqueue_futex()
1441 hb_waiters_dec(hb); in __unqueue_futex()
1586 struct futex_hash_bucket *hb; in futex_wake() local
1599 hb = hash_futex(&key); in futex_wake()
1602 if (!hb_waiters_pending(hb)) in futex_wake()
1605 spin_lock(&hb->lock); in futex_wake()
1607 plist_for_each_entry_safe(this, next, &hb->chain, list) { in futex_wake()
1624 spin_unlock(&hb->lock); in futex_wake()
1807 struct futex_hash_bucket *hb) in requeue_pi_wake_futex() argument
1816 q->lock_ptr = &hb->lock; in requeue_pi_wake_futex()
2189 __acquires(&hb->lock) in queue_lock()
2191 struct futex_hash_bucket *hb; in queue_lock() local
2193 hb = hash_futex(&q->key); in queue_lock()
2203 hb_waiters_inc(hb); /* implies smp_mb(); (A) */ in queue_lock()
2205 q->lock_ptr = &hb->lock; in queue_lock()
2207 spin_lock(&hb->lock); in queue_lock()
2208 return hb; in queue_lock()
2212 queue_unlock(struct futex_hash_bucket *hb) in queue_unlock() argument
2213 __releases(&hb->lock) in queue_unlock()
2215 spin_unlock(&hb->lock); in queue_unlock()
2216 hb_waiters_dec(hb); in queue_unlock()
2219 static inline void __queue_me(struct futex_q *q, struct futex_hash_bucket *hb) in __queue_me() argument
2234 plist_add(&q->list, &hb->chain); in __queue_me()
2250 static inline void queue_me(struct futex_q *q, struct futex_hash_bucket *hb) in queue_me() argument
2251 __releases(&hb->lock) in queue_me()
2253 __queue_me(q, hb); in queue_me()
2254 spin_unlock(&hb->lock); in queue_me()
2577 static void futex_wait_queue_me(struct futex_hash_bucket *hb, struct futex_q *q, in futex_wait_queue_me() argument
2587 queue_me(q, hb); in futex_wait_queue_me()
2627 struct futex_q *q, struct futex_hash_bucket **hb) in futex_wait_setup() argument
2656 *hb = queue_lock(q); in futex_wait_setup()
2661 queue_unlock(*hb); in futex_wait_setup()
2674 queue_unlock(*hb); in futex_wait_setup()
2686 struct futex_hash_bucket *hb; in futex_wait() local
2701 ret = futex_wait_setup(uaddr, val, flags, &q, &hb); in futex_wait()
2706 futex_wait_queue_me(hb, &q, to); in futex_wait()
2779 struct futex_hash_bucket *hb; in futex_lock_pi() local
2797 hb = queue_lock(&q); in futex_lock_pi()
2799 ret = futex_lock_pi_atomic(uaddr, hb, &q.key, &q.pi_state, current, in futex_lock_pi()
2821 queue_unlock(hb); in futex_lock_pi()
2840 __queue_me(&q, hb); in futex_lock_pi()
2932 queue_unlock(hb); in futex_lock_pi()
2942 queue_unlock(hb); in futex_lock_pi()
2963 struct futex_hash_bucket *hb; in futex_unlock_pi() local
2983 hb = hash_futex(&key); in futex_unlock_pi()
2984 spin_lock(&hb->lock); in futex_unlock_pi()
2991 top_waiter = futex_top_waiter(hb, &key); in futex_unlock_pi()
3018 spin_unlock(&hb->lock); in futex_unlock_pi()
3057 spin_unlock(&hb->lock); in futex_unlock_pi()
3077 spin_unlock(&hb->lock); in futex_unlock_pi()
3111 int handle_early_requeue_pi_wakeup(struct futex_hash_bucket *hb, in handle_early_requeue_pi_wakeup() argument
3125 WARN_ON(q->lock_ptr && (&hb->lock != q->lock_ptr)); in handle_early_requeue_pi_wakeup()
3130 plist_del(&q->list, &hb->chain); in handle_early_requeue_pi_wakeup()
3131 hb_waiters_dec(hb); in handle_early_requeue_pi_wakeup()
3190 struct futex_hash_bucket *hb; in futex_wait_requeue_pi() local
3225 ret = futex_wait_setup(uaddr, val, flags, &q, &hb); in futex_wait_requeue_pi()
3234 queue_unlock(hb); in futex_wait_requeue_pi()
3240 futex_wait_queue_me(hb, &q, to); in futex_wait_requeue_pi()
3242 spin_lock(&hb->lock); in futex_wait_requeue_pi()
3243 ret = handle_early_requeue_pi_wakeup(hb, &q, &key2, to); in futex_wait_requeue_pi()
3244 spin_unlock(&hb->lock); in futex_wait_requeue_pi()