Lines Matching refs:he
207 #define for_each_hash_entry(he, offset, hash) \ argument
208 for (hash &= ~(PV_HE_PER_LINE - 1), he = &pv_lock_hash[hash], offset = 0; \
210 offset++, he = &pv_lock_hash[(hash + offset) & ((1 << pv_lock_hash_bits) - 1)])
215 struct pv_hash_entry *he; in pv_hash() local
218 for_each_hash_entry(he, offset, hash) { in pv_hash()
220 if (!cmpxchg(&he->lock, NULL, lock)) { in pv_hash()
221 WRITE_ONCE(he->node, node); in pv_hash()
223 return &he->lock; in pv_hash()
242 struct pv_hash_entry *he; in pv_unhash() local
245 for_each_hash_entry(he, offset, hash) { in pv_unhash()
246 if (READ_ONCE(he->lock) == lock) { in pv_unhash()
247 node = READ_ONCE(he->node); in pv_unhash()
248 WRITE_ONCE(he->lock, NULL); in pv_unhash()