Lines Matching refs:hash
58 void batadv_hash_set_lock_class(struct batadv_hashtable *hash,
62 void batadv_hash_destroy(struct batadv_hashtable *hash);
75 static inline int batadv_hash_add(struct batadv_hashtable *hash, in batadv_hash_add() argument
87 if (!hash) in batadv_hash_add()
90 index = choose(data, hash->size); in batadv_hash_add()
91 head = &hash->table[index]; in batadv_hash_add()
92 list_lock = &hash->list_locks[index]; in batadv_hash_add()
106 atomic_inc(&hash->generation); in batadv_hash_add()
129 static inline void *batadv_hash_remove(struct batadv_hashtable *hash, in batadv_hash_remove() argument
139 index = choose(data, hash->size); in batadv_hash_remove()
140 head = &hash->table[index]; in batadv_hash_remove()
142 spin_lock_bh(&hash->list_locks[index]); in batadv_hash_remove()
149 atomic_inc(&hash->generation); in batadv_hash_remove()
152 spin_unlock_bh(&hash->list_locks[index]); in batadv_hash_remove()