History

futex: Rename hash_futex()

In order to prepare introducing these symbols into the global namespace; rename: s/hash_futex/futex_hash/g

Peter Zijlstra committed 5 years ago

Commit eee5a7b1 parent af92dce1 file · +11 −11Browse files

Unified · Split

kernel/futex/core.c+11−11
@@ -279,7 +279,7 @@ struct futex_hash_bucket { · 278 unmodified lines
279279
280280 /*
281281 * The base of the bucket array and its size are always used together
282− * (after initialization only in hash_futex()), so ensure that they
282+ * (after initialization only in futex_hash()), so ensure that they
283283 * reside in the same cacheline.
284284 */
285285 static struct {
@@ -380,13 +380,13 @@ static inline int hb_waiters_pending(struct futex_hash_bucket *hb) · 94 unmodified lines
380380 }
381381
382382 /**
383− * hash_futex - Return the hash bucket in the global hash
383+ * futex_hash - Return the hash bucket in the global hash
384384 * @key: Pointer to the futex key for which the hash is calculated
385385 *
386386 * We hash on the keys returned from get_futex_key (see below) and return the
387387 * corresponding hash bucket in the global hash.
388388 */
389−static struct futex_hash_bucket *hash_futex(union futex_key *key)
389+static struct futex_hash_bucket *futex_hash(union futex_key *key)
390390 {
391391 u32 hash = jhash2((u32 *)key, offsetof(typeof(*key), both.offset) / 4,
392392 key->both.offset);
@@ -885,7 +885,7 @@ static void exit_pi_state_list(struct task_struct *curr) · 492 unmodified lines
885885 next = head->next;
886886 pi_state = list_entry(next, struct futex_pi_state, list);
887887 key = pi_state->key;
888− hb = hash_futex(&key);
888+ hb = futex_hash(&key);
889889
890890 /*
891891 * We can race against put_pi_state() removing itself from the
@@ -1634,7 +1634,7 @@ int futex_wake(u32 __user *uaddr, unsigned int flags, int nr_wake, u32 bitset) · 742 unmodified lines
16341634 if (unlikely(ret != 0))
16351635 return ret;
16361636
1637− hb = hash_futex(&key);
1637+ hb = futex_hash(&key);
16381638
16391639 /* Make sure we really have tasks to wakeup */
16401640 if (!hb_waiters_pending(hb))
@@ -1731,8 +1731,8 @@ retry: · 90 unmodified lines
17311731 if (unlikely(ret != 0))
17321732 return ret;
17331733
1734− hb1 = hash_futex(&key1);
1735− hb2 = hash_futex(&key2);
1734+ hb1 = futex_hash(&key1);
1735+ hb2 = futex_hash(&key2);
17361736
17371737 retry_private:
17381738 double_lock_hb(hb1, hb2);
@@ -2172,8 +2172,8 @@ retry: · 433 unmodified lines
21722172 if (requeue_pi && match_futex(&key1, &key2))
21732173 return -EINVAL;
21742174
2175− hb1 = hash_futex(&key1);
2176− hb2 = hash_futex(&key2);
2175+ hb1 = futex_hash(&key1);
2176+ hb2 = futex_hash(&key2);
21772177
21782178 retry_private:
21792179 hb_waiters_inc(hb2);
@@ -2415,7 +2415,7 @@ static inline struct futex_hash_bucket *futex_q_lock(struct futex_q *q) · 235 unmodified lines
24152415 {
24162416 struct futex_hash_bucket *hb;
24172417
2418− hb = hash_futex(&q->key);
2418+ hb = futex_hash(&q->key);
24192419
24202420 /*
24212421 * Increment the counter before taking the lock so that
@@ -3177,7 +3177,7 @@ retry: · 755 unmodified lines
31773177 if (ret)
31783178 return ret;
31793179
3180− hb = hash_futex(&key);
3180+ hb = futex_hash(&key);
31813181 spin_lock(&hb->lock);
31823182
31833183 /*