Lines Matching refs:hash

16  * Look up something in a shared memory hash table.  The "elt" argument
18 * structure it is that appears in the hash table. The comparison function
20 * begin: address of the beginning of the hash table.
23 * elt: the item for which we are searching in the hash table.
25 * nelems: the number of buckets in the hash table.
26 * hash_func: the hash function that operates on elements of the type of elt
30 * If the element is not in the hash table, this macro exits with result
33 #define HASHLOOKUP(begin, type, field, elt, r, n, hash, cmp) do { \
37 __ndx = hash(elt) % (n); \
48 * Insert a new entry into the hash table. This assumes that lookup has
50 * begin: the beginning address of the hash table.
54 * nelems: the number of buckets in the hash table.
55 * hash_func: the hash function that operates on elements of the type of elt
57 #define HASHINSERT(begin, type, field, elt, n, hash) do { \
61 __ndx = hash(elt) % (n); \
69 * begin: address of the beginning of the hash table.
73 * nelems: the number of buckets in the hash table.
74 * hash_func: the hash function that operates on elements of the type of elt
78 #define HASHREMOVE(begin, type, field, elt, n, hash, cmp) { \
83 __ndx = hash(elt) % (n); \
85 HASHLOOKUP(begin, type, field, elt, __entp, n, hash, cmp); \
92 * begin: address of the beginning of the hash table.
96 * nelems: the number of buckets in the hash table.
97 * hash_func: the hash function that operates on elements of the type of elt
99 #define HASHREMOVE_EL(begin, type, field, obj, n, hash) { \
103 __ndx = hash(obj) % (n); \