Lines Matching refs:htbl
59 struct htbl { struct
71 #define HFIRST(htbl, arg) \ argument
72 ((htbl)->htbl_ptrs[(htbl)->htbl_hash((arg), 0) % (htbl)->htbl_size])
75 #define HADD(htbl, strp) \ argument
76 hash_link((htbl), (htbl)->htbl_hash((strp), (htbl)->htbl_key_off), \
103 static void htbl_grow(struct htbl *);
109 static struct htbl ahash_tbl = {
117 static struct htbl bhash_tbl = {
125 static struct htbl ihash_tbl = {
132 static struct htbl nhash_tbl = {
204 hash_link(struct htbl *htbl, uint_t hval, void *strp) in hash_link() argument
208 if (htbl->htbl_grow && htbl->htbl_ifcount >= htbl->htbl_size * 5) in hash_link()
209 htbl_grow(htbl); in hash_link()
211 hep = &htbl->htbl_ptrs[hval % htbl->htbl_size]; in hash_link()
212 link_in(hep, strp, htbl->htbl_link_off); in hash_link()
213 htbl->htbl_ifcount++; in hash_link()
218 hash_unlink(struct htbl *htbl, void *strp) in hash_unlink() argument
220 link_out(strp, htbl->htbl_link_off); in hash_unlink()
221 htbl->htbl_ifcount--; in hash_unlink()
265 htbl_grow(struct htbl *htbl) in htbl_grow() argument
272 if ((new_size = hash_table_sizes[htbl->htbl_size_index + 1]) == 0) in htbl_grow()
289 saved_old_ptrs = old_ptrs = htbl->htbl_ptrs; in htbl_grow()
290 old_size = htbl->htbl_size; in htbl_grow()
291 htbl->htbl_ptrs = new_ptrs; in htbl_grow()
292 htbl->htbl_size = new_size; in htbl_grow()
293 htbl->htbl_size_index++; in htbl_grow()
294 htbl->htbl_ifcount = 0; in htbl_grow()
300 htbl->htbl_grow = _B_FALSE; in htbl_grow()
303 HADD(htbl, strp); in htbl_grow()
306 htbl->htbl_grow = _B_TRUE; in htbl_grow()