Lines Matching refs:hb

342 static inline void hb_waiters_inc(struct futex_hash_bucket *hb)  in hb_waiters_inc()  argument
345 atomic_inc(&hb->waiters); in hb_waiters_inc()
357 static inline void hb_waiters_dec(struct futex_hash_bucket *hb) in hb_waiters_dec() argument
360 atomic_dec(&hb->waiters); in hb_waiters_dec()
364 static inline int hb_waiters_pending(struct futex_hash_bucket *hb) in hb_waiters_pending() argument
367 return atomic_read(&hb->waiters); in hb_waiters_pending()
765 static struct futex_q *futex_top_waiter(struct futex_hash_bucket *hb, in futex_top_waiter() argument
770 plist_for_each_entry(this, &hb->chain, list) { in futex_top_waiter()
897 struct futex_hash_bucket *hb; in exit_pi_state_list() local
912 hb = hash_futex(&key); in exit_pi_state_list()
932 spin_lock(&hb->lock); in exit_pi_state_list()
942 spin_unlock(&hb->lock); in exit_pi_state_list()
954 spin_unlock(&hb->lock); in exit_pi_state_list()
1309 struct futex_hash_bucket *hb, in lookup_pi_state() argument
1312 struct futex_q *top_waiter = futex_top_waiter(hb, key); in lookup_pi_state()
1362 static int futex_lock_pi_atomic(u32 __user *uaddr, struct futex_hash_bucket *hb, in futex_lock_pi_atomic() argument
1394 top_waiter = futex_top_waiter(hb, key); in futex_lock_pi_atomic()
1446 struct futex_hash_bucket *hb; in __unqueue_futex() local
1452 hb = container_of(q->lock_ptr, struct futex_hash_bucket, lock); in __unqueue_futex()
1453 plist_del(&q->list, &hb->chain); in __unqueue_futex()
1454 hb_waiters_dec(hb); in __unqueue_futex()
1597 struct futex_hash_bucket *hb; in futex_wake() local
1610 hb = hash_futex(&key); in futex_wake()
1613 if (!hb_waiters_pending(hb)) in futex_wake()
1616 spin_lock(&hb->lock); in futex_wake()
1618 plist_for_each_entry_safe(this, next, &hb->chain, list) { in futex_wake()
1635 spin_unlock(&hb->lock); in futex_wake()
1830 struct futex_hash_bucket *hb) in requeue_pi_wake_futex() argument
1840 q->lock_ptr = &hb->lock; in requeue_pi_wake_futex()
2222 __acquires(&hb->lock) in queue_lock()
2224 struct futex_hash_bucket *hb; in queue_lock() local
2226 hb = hash_futex(&q->key); in queue_lock()
2236 hb_waiters_inc(hb); /* implies smp_mb(); (A) */ in queue_lock()
2238 q->lock_ptr = &hb->lock; in queue_lock()
2240 spin_lock(&hb->lock); in queue_lock()
2241 return hb; in queue_lock()
2245 queue_unlock(struct futex_hash_bucket *hb) in queue_unlock() argument
2246 __releases(&hb->lock) in queue_unlock()
2248 spin_unlock(&hb->lock); in queue_unlock()
2249 hb_waiters_dec(hb); in queue_unlock()
2252 static inline void __queue_me(struct futex_q *q, struct futex_hash_bucket *hb) in __queue_me() argument
2267 plist_add(&q->list, &hb->chain); in __queue_me()
2283 static inline void queue_me(struct futex_q *q, struct futex_hash_bucket *hb) in queue_me() argument
2284 __releases(&hb->lock) in queue_me()
2286 __queue_me(q, hb); in queue_me()
2287 spin_unlock(&hb->lock); in queue_me()
2600 static void futex_wait_queue_me(struct futex_hash_bucket *hb, struct futex_q *q, in futex_wait_queue_me() argument
2610 queue_me(q, hb); in futex_wait_queue_me()
2650 struct futex_q *q, struct futex_hash_bucket **hb) in futex_wait_setup() argument
2679 *hb = queue_lock(q); in futex_wait_setup()
2684 queue_unlock(*hb); in futex_wait_setup()
2698 queue_unlock(*hb); in futex_wait_setup()
2713 struct futex_hash_bucket *hb; in futex_wait() local
2728 ret = futex_wait_setup(uaddr, val, flags, &q, &hb); in futex_wait()
2733 futex_wait_queue_me(hb, &q, to); in futex_wait()
2805 struct futex_hash_bucket *hb; in futex_lock_pi() local
2823 hb = queue_lock(&q); in futex_lock_pi()
2825 ret = futex_lock_pi_atomic(uaddr, hb, &q.key, &q.pi_state, current, 0); in futex_lock_pi()
2845 queue_unlock(hb); in futex_lock_pi()
2859 __queue_me(&q, hb); in futex_lock_pi()
2951 queue_unlock(hb); in futex_lock_pi()
2963 queue_unlock(hb); in futex_lock_pi()
2985 struct futex_hash_bucket *hb; in futex_unlock_pi() local
3005 hb = hash_futex(&key); in futex_unlock_pi()
3006 spin_lock(&hb->lock); in futex_unlock_pi()
3013 top_waiter = futex_top_waiter(hb, &key); in futex_unlock_pi()
3040 spin_unlock(&hb->lock); in futex_unlock_pi()
3079 spin_unlock(&hb->lock); in futex_unlock_pi()
3099 spin_unlock(&hb->lock); in futex_unlock_pi()
3136 int handle_early_requeue_pi_wakeup(struct futex_hash_bucket *hb, in handle_early_requeue_pi_wakeup() argument
3150 WARN_ON(q->lock_ptr && (&hb->lock != q->lock_ptr)); in handle_early_requeue_pi_wakeup()
3155 plist_del(&q->list, &hb->chain); in handle_early_requeue_pi_wakeup()
3156 hb_waiters_dec(hb); in handle_early_requeue_pi_wakeup()
3215 struct futex_hash_bucket *hb; in futex_wait_requeue_pi() local
3250 ret = futex_wait_setup(uaddr, val, flags, &q, &hb); in futex_wait_requeue_pi()
3259 queue_unlock(hb); in futex_wait_requeue_pi()
3265 futex_wait_queue_me(hb, &q, to); in futex_wait_requeue_pi()
3267 spin_lock(&hb->lock); in futex_wait_requeue_pi()
3268 ret = handle_early_requeue_pi_wakeup(hb, &q, &key2, to); in futex_wait_requeue_pi()
3269 spin_unlock(&hb->lock); in futex_wait_requeue_pi()