Home
last modified time | relevance | path

Searched refs:ht (Results 1 – 25 of 326) sorted by relevance

12345678910>>...14

/netbsd-src/external/gpl2/gmake/dist/
H A Dhash.c27 static void hash_rehash __P((struct hash_table* ht));
43 hash_init (struct hash_table *ht, unsigned long size, in hash_init() argument
46 ht->ht_size = round_up_2 (size); in hash_init()
47 ht->ht_empty_slots = ht->ht_size; in hash_init()
48 ht->ht_vec = (void**) CALLOC (struct token *, ht->ht_size); in hash_init()
49 if (ht->ht_vec == 0) in hash_init()
52 ht->ht_size * sizeof(struct token *)); in hash_init()
56 ht->ht_capacity = ht->ht_size - (ht->ht_size / 16); /* 93.75% loading factor */ in hash_init()
57 ht->ht_fill = 0; in hash_init()
58 ht->ht_collisions = 0; in hash_init()
[all …]
H A Dhash.h60 void hash_init __P((struct hash_table *ht, unsigned long size,
62 void hash_load __P((struct hash_table *ht, void *item_table,
64 void **hash_find_slot __P((struct hash_table *ht, void const *key));
65 void *hash_find_item __P((struct hash_table *ht, void const *key));
66 void *hash_insert __P((struct hash_table *ht, const void *item));
67 void *hash_insert_at __P((struct hash_table *ht, const void *item, void const *slot));
68 void *hash_delete __P((struct hash_table *ht, void const *item));
69 void *hash_delete_at __P((struct hash_table *ht, void const *slot));
70 void hash_delete_items __P((struct hash_table *ht));
71 void hash_free_items __P((struct hash_table *ht));
[all …]
/netbsd-src/external/mpl/bind/dist/lib/isc/
H A Dht.c1 /* $NetBSD: ht.c,v 1.11 2025/01/26 16:25:37 christos Exp $ */
21 #include <isc/ht.h>
31 #define ISC_HT_VALID(ht) ISC_MAGIC_VALID(ht, ISC_HT_MAGIC)
39 #define TRY_NEXTTABLE(idx, ht) (idx == ht->hindex && rehashing_in_progress(ht))
66 isc_ht_t *ht;
73 isc__ht_find(const isc_ht_t *ht, const unsigned char *key,
76 isc__ht_add(isc_ht_t *ht, cons
30 ISC_HT_VALID(ht) global() argument
38 TRY_NEXTTABLE(idx,ht) global() argument
65 isc_ht_t *ht; global() member
156 rehashing_in_progress(const isc_ht_t * ht) rehashing_in_progress() argument
161 hashtable_is_overcommited(isc_ht_t * ht) hashtable_is_overcommited() argument
166 rehash_bits(isc_ht_t * ht,size_t newcount) rehash_bits() argument
180 hashtable_rehash(isc_ht_t * ht,uint32_t newbits) hashtable_rehash() argument
203 hashtable_rehash_one(isc_ht_t * ht) hashtable_rehash_one() argument
237 maybe_rehash(isc_ht_t * ht,size_t newcount) maybe_rehash() argument
246 hashtable_new(isc_ht_t * ht,const uint8_t idx,const uint8_t bits) hashtable_new() argument
263 hashtable_free(isc_ht_t * ht,const uint8_t idx) hashtable_free() argument
285 isc_ht_t *ht = NULL; isc_ht_init() local
308 isc_ht_t *ht; isc_ht_destroy() local
329 isc__ht_add(isc_ht_t * ht,const unsigned char * key,const uint32_t keysize,const uint32_t hashval,const uint8_t idx,void * value) isc__ht_add() argument
351 isc_ht_add(isc_ht_t * ht,const unsigned char * key,const uint32_t keysize,void * value) isc_ht_add() argument
378 isc__ht_find(const isc_ht_t * ht,const unsigned char * key,const uint32_t keysize,const uint32_t hashval,const uint8_t idx) isc__ht_find() argument
407 isc_ht_find(const isc_ht_t * ht,const unsigned char * key,const uint32_t keysize,void ** valuep) isc_ht_find() argument
430 isc__ht_delete(isc_ht_t * ht,const unsigned char * key,const uint32_t keysize,const uint32_t hashval,const uint8_t idx) isc__ht_delete() argument
460 isc_ht_delete(isc_ht_t * ht,const unsigned char * key,const uint32_t keysize) isc_ht_delete() argument
490 isc_ht_iter_create(isc_ht_t * ht,isc_ht_iter_t ** itp) isc_ht_iter_create() argument
508 isc_ht_t *ht; isc_ht_iter_destroy() local
520 isc_ht_t *ht; isc_ht_iter_first() local
534 isc_ht_t *ht = it->ht; isc__ht_iter_next() local
578 isc_ht_t *ht; isc_ht_iter_delcurrent_next() local
618 isc_ht_count(const isc_ht_t * ht) isc_ht_count() argument
[all...]
/netbsd-src/external/mpl/dhcp/bind/dist/lib/isc/
H A Dht.c30 #define ISC_HT_VALID(ht) ISC_MAGIC_VALID(ht, ISC_HT_MAGIC) argument
38 #define TRY_NEXTTABLE(idx, ht) (idx == ht->hindex && rehashing_in_progress(ht)) argument
65 isc_ht_t *ht; member
72 isc__ht_find(const isc_ht_t *ht, const unsigned char *key,
75 isc__ht_add(isc_ht_t *ht, const unsigned char *key, const uint32_t keysize,
78 isc__ht_delete(isc_ht_t *ht, const unsigned char *key, const uint32_t keysize,
82 rehash_bits(isc_ht_t *ht, size_t newcount);
85 hashtable_new(isc_ht_t *ht, const uint8_t idx, const uint8_t bits);
87 hashtable_free(isc_ht_t *ht, const uint8_t idx);
89 hashtable_rehash(isc_ht_t *ht, uint32_t newbits);
[all …]
/netbsd-src/external/ibm-public/postfix/dist/src/util/
H A Dbinhash.c217 BINHASH_INFO *ht; in binhash_grow() local
226 for (ht = *h++; ht; ht = next) { in binhash_grow()
227 next = ht->next; in binhash_grow()
228 binhash_link(table, ht); in binhash_grow()
238 BINHASH_INFO *ht; in binhash_enter() local
242 ht = (BINHASH_INFO *) mymalloc(sizeof(BINHASH_INFO)); in binhash_enter()
243 ht->key = mymemdup(key, key_len); in binhash_enter()
244 ht->key_len = key_len; in binhash_enter()
245 ht->value = value; in binhash_enter()
246 binhash_link(table, ht); in binhash_enter()
[all …]
H A Dhtable.c210 HTABLE_INFO *ht; in htable_grow() local
219 for (ht = *h++; ht; ht = next) { in htable_grow()
220 next = ht->next; in htable_grow()
221 htable_link(table, ht); in htable_grow()
231 HTABLE_INFO *ht; in htable_enter() local
235 ht = (HTABLE_INFO *) mymalloc(sizeof(HTABLE_INFO)); in htable_enter()
236 ht->key = mystrdup(key); in htable_enter()
237 ht->value = value; in htable_enter()
238 htable_link(table, ht); in htable_enter()
239 return (ht); in htable_enter()
[all …]
H A Ddict_ht.c99 HTABLE_INFO *ht; in dict_ht_update() local
111 if ((ht = htable_locate(dict_ht->table, name)) != 0) { in dict_ht_update()
112 myfree(ht->value); in dict_ht_update()
114 ht = htable_enter(dict_ht->table, name, (void *) 0); in dict_ht_update()
116 ht->value = saved_value; in dict_ht_update()
126 HTABLE_INFO *ht; in dict_ht_sequence() local
128 ht = htable_sequence(dict_ht->table, in dict_ht_sequence()
132 if (ht != 0) { in dict_ht_sequence()
133 *name = ht->key; in dict_ht_sequence()
134 *value = ht->value; in dict_ht_sequence()
H A Dknown_tcp_ports.c95 HTABLE_INFO *ht; in filter_known_tcp_port() local
99 } else if ((ht = htable_locate(known_tcp_ports, name_or_port)) != 0) { in filter_known_tcp_port()
100 return (ht->value); in filter_known_tcp_port()
129 HTABLE_INFO **ht; in export_known_tcp_ports() local
136 for (ht = list; *ht; ht++) in export_known_tcp_ports()
137 vstring_sprintf_append(out, "%s%s=%s", ht > list ? " " : "", in export_known_tcp_ports()
138 ht[0]->key, (const char *) ht[0]->value); in export_known_tcp_ports()
H A Dnvtable.c115 NVTABLE_INFO *ht; in nvtable_update() local
117 if ((ht = htable_locate(table, key)) != 0) { in nvtable_update()
118 myfree(ht->value); in nvtable_update()
120 ht = htable_enter(table, key, (void *) 0); in nvtable_update()
122 ht->value = mystrdup(value); in nvtable_update()
123 return (ht); in nvtable_update()
H A Dattr_print0.c121 HTABLE_INFO **ht; in attr_vprint0() local
186 for (ht = ht_info_list; *ht; ht++) { in attr_vprint0()
187 vstream_fwrite(fp, ht[0]->key, strlen(ht[0]->key) + 1); in attr_vprint0()
188 vstream_fwrite(fp, ht[0]->value, strlen(ht[0]->value) + 1); in attr_vprint0()
191 ht[0]->key, (char *) ht[0]->value); in attr_vprint0()
H A Dattr_print64.c156 HTABLE_INFO **ht; in attr_vprint64() local
224 for (ht = ht_info_list; *ht; ht++) { in attr_vprint64()
225 attr_print64_str(fp, ht[0]->key, strlen(ht[0]->key)); in attr_vprint64()
227 attr_print64_str(fp, ht[0]->value, strlen(ht[0]->value)); in attr_vprint64()
231 ht[0]->key, (char *) ht[0]->value); in attr_vprint64()
H A Dattr_print_plain.c122 HTABLE_INFO **ht; in attr_vprint_plain() local
182 for (ht = ht_info_list; *ht; ht++) { in attr_vprint_plain()
183 vstream_fprintf(fp, "%s=%s\n", ht[0]->key, (char *) ht[0]->value); in attr_vprint_plain()
186 ht[0]->key, (char *) ht[0]->value); in attr_vprint_plain()
/netbsd-src/usr.bin/config/
H A Dhash.c98 ht_init(struct hashtab *ht, size_t sz) in ht_init() argument
102 ht->ht_tab = emalloc(sz * sizeof (ht->ht_tab[0])); in ht_init()
103 ht->ht_size = sz; in ht_init()
104 ht->ht_mask = sz - 1; in ht_init()
106 TAILQ_INIT(&ht->ht_tab[n]); in ht_init()
107 ht->ht_used = 0; in ht_init()
108 ht->ht_lim = HASHFRACTION(sz); in ht_init()
115 ht_expand(struct hashtab *ht) in ht_expand() argument
121 n = ht in ht_expand()
209 struct hashtab *ht; intern() local
233 struct hashtab *ht; ht_new() local
241 ht_free(struct hashtab * ht) ht_free() argument
265 ht_insrep2(struct hashtab * ht,const char * nam1,const char * nam2,void * val,int replace) ht_insrep2() argument
290 ht_insrep(struct hashtab * ht,const char * nam,void * val,int replace) ht_insrep() argument
299 ht_remove2(struct hashtab * ht,const char * name1,const char * name2) ht_remove2() argument
321 ht_remove(struct hashtab * ht,const char * name) ht_remove() argument
327 ht_lookup2(struct hashtab * ht,const char * nam1,const char * nam2) ht_lookup2() argument
342 ht_lookup(struct hashtab * ht,const char * nam) ht_lookup() argument
354 ht_enumerate2(struct hashtab * ht,ht_callback2 cbfunc2,void * arg) ht_enumerate2() argument
370 ht_enumerate(struct hashtab * ht,ht_callback cbfunc,void * arg) ht_enumerate() argument
[all...]
/netbsd-src/sys/external/bsd/drm/dist/bsd-core/
H A Ddrm_hashtab.c44 int drm_ht_create(struct drm_open_hash *ht, unsigned int order) in drm_ht_create() argument
46 ht->size = 1 << order; in drm_ht_create()
47 ht->order = order; in drm_ht_create()
48 ht->table = NULL; in drm_ht_create()
49 ht->table = hashinit(ht->size, HASH_LIST, false, &ht->mask); in drm_ht_create()
50 if (!ht->table) { in drm_ht_create()
57 void drm_ht_verbose_list(struct drm_open_hash *ht, unsigned long key) in drm_ht_verbose_list() argument
64 hashed_key = hash32_buf(&key, sizeof(key), ht->order); in drm_ht_verbose_list()
66 h_list = &ht->table[hashed_key & ht->mask]; in drm_ht_verbose_list()
72 drm_ht_find_key(struct drm_open_hash *ht, unsigned long key) in drm_ht_find_key() argument
[all …]
H A Ddrm_hashtab.h53 extern int drm_ht_create(struct drm_open_hash *ht, unsigned int order);
54 extern int drm_ht_insert_item(struct drm_open_hash *ht, struct drm_hash_item *item);
55 extern int drm_ht_just_insert_please(struct drm_open_hash *ht, struct drm_hash_item *item,
58 extern int drm_ht_find_item(struct drm_open_hash *ht, unsigned long key, struct drm_hash_item **ite…
60 extern void drm_ht_verbose_list(struct drm_open_hash *ht, unsigned long key);
61 extern int drm_ht_remove_key(struct drm_open_hash *ht, unsigned long key);
62 extern int drm_ht_remove_item(struct drm_open_hash *ht, struct drm_hash_item *item);
63 extern void drm_ht_remove(struct drm_open_hash *ht);
/netbsd-src/sys/external/bsd/drm2/dist/drm/
H A Ddrm_hashtab.c50 int drm_ht_create(struct drm_open_hash *ht, unsigned int order) in drm_ht_create() argument
54 ht->order = order; in drm_ht_create()
55 ht->table = NULL; in drm_ht_create()
56 if (size <= PAGE_SIZE / sizeof(*ht->table)) in drm_ht_create()
57 ht->table = kcalloc(size, sizeof(*ht->table), GFP_KERNEL); in drm_ht_create()
59 ht->table = vzalloc(array_size(size, sizeof(*ht->table))); in drm_ht_create()
60 if (!ht->table) { in drm_ht_create()
68 void drm_ht_verbose_list(struct drm_open_hash *ht, unsigned long key) in drm_ht_verbose_list() argument
75 hashed_key = hash_long(key, ht->order); in drm_ht_verbose_list()
77 h_list = &ht->table[hashed_key]; in drm_ht_verbose_list()
[all …]
/netbsd-src/external/bsd/top/dist/
H A Dhash.h77 void hash_sizeinfo(unsigned int *sizes, int max, hash_table *ht);
87 void *hash_add_uint(hash_table *ht, unsigned int key, void *value);
88 void *hash_replace_uint(hash_table *ht, unsigned int key, void *value);
89 void *hash_lookup_uint(hash_table *ht, unsigned int key);
90 void *hash_remove_uint(hash_table *ht, unsigned int key);
91 hash_item_uint *hash_first_uint(hash_table *ht, hash_pos *pos);
101 void *hash_add_pid(hash_table *ht, pid_t key, void *value);
102 void *hash_replace_pid(hash_table *ht, pid_t key, void *value);
103 void *hash_lookup_pid(hash_table *ht, pid_t key);
104 void *hash_remove_pid(hash_table *ht, pid_t key);
[all …]
H A Dhash.c83 string_hash(hash_table *ht, char *key) in string_hash() argument
104 return (s % ht->num_buckets); in string_hash()
225 hash_count(hash_table *ht) in hash_count() argument
232 bucket = ht->buckets; in hash_count()
233 while (i++ < ht->num_buckets) in hash_count()
251 hash_sizeinfo(unsigned int *sizes, int max, hash_table *ht) in hash_sizeinfo() argument
260 bucket = ht->buckets; in hash_sizeinfo()
262 while (i++ < ht->num_buckets) in hash_sizeinfo()
287 hash_add_uint(hash_table *ht, unsigned int key, void *value) in hash_add_uint() argument
307 bucket = &(ht->buckets[(key % ht->num_buckets)]); in hash_add_uint()
[all …]
H A Dhash.m4c126 string_hash(hash_table *ht, char *key)
147 return (s % ht->num_buckets);
258 * unsigned int hash_count(hash_table *ht)
264 hash_count(hash_table *ht)
271 bucket = ht->buckets;
272 while (i++ < ht->num_buckets)
282 * void hash_sizeinfo(unsigned int *sizes, int max, hash_table *ht)
289 hash_sizeinfo(unsigned int *sizes, int max, hash_table *ht)
298 bucket = ht->buckets;
300 while (i++ < ht->num_buckets)
[all …]
/netbsd-src/external/mpl/bind/dist/tests/isc/
H A Dht_test.c29 #include <isc/ht.h>
39 #include "ht.c"
44 isc_ht_t *ht = NULL; in test_ht_full()
48 isc_ht_init(&ht, mctx, init_bits, ISC_HT_CASE_SENSITIVE); in test_ht_full()
49 assert_non_null(ht); in test_ht_full()
59 result = isc_ht_add(ht, key, 16, (void *)i); in test_ht_full()
68 result = isc_ht_find(ht, key, 16, &f); in test_ht_full()
77 result = isc_ht_add(ht, key, 16, (void *)i); in test_ht_full()
89 result = isc_ht_add(ht, (const unsigned char *)key, strlen(key), in test_ht_full()
102 result = isc_ht_find(ht, ke in test_ht_full()
45 isc_ht_t *ht = NULL; test_ht_full() local
185 isc_ht_t *ht = NULL; test_ht_iterator() local
318 isc_ht_t *ht = NULL; ISC_RUN_TEST_IMPL() local
[all...]
/netbsd-src/crypto/external/cpl/trousers/dist/src/tspi/rpc/
H A Dhosttable.c22 static struct host_table *ht = NULL; variable
27 ht = calloc(1, sizeof(struct host_table)); in host_table_init()
28 if (ht == NULL) { in host_table_init()
33 MUTEX_INIT(ht->lock); in host_table_init()
54 MUTEX_LOCK(ht->lock); in host_table_final()
56 for (hte = ht->entries; hte; hte = next) { in host_table_final()
66 MUTEX_UNLOCK(ht->lock); in host_table_final()
68 free(ht); in host_table_final()
69 ht = NULL; in host_table_final()
115 MUTEX_LOCK(ht->lock); in __tspi_add_table_entry()
[all …]
/netbsd-src/sys/external/bsd/drm2/dist/include/drm/
H A Ddrm_hashtab.h56 int drm_ht_create(struct drm_open_hash *ht, unsigned int order);
57 int drm_ht_insert_item(struct drm_open_hash *ht, struct drm_hash_item *item);
58 int drm_ht_just_insert_please(struct drm_open_hash *ht, struct drm_hash_item *item,
61 int drm_ht_find_item(struct drm_open_hash *ht, unsigned long key, struct drm_hash_item **item);
63 void drm_ht_verbose_list(struct drm_open_hash *ht, unsigned long key);
64 int drm_ht_remove_key(struct drm_open_hash *ht, unsigned long key);
65 int drm_ht_remove_item(struct drm_open_hash *ht, struct drm_hash_item *item);
66 void drm_ht_remove(struct drm_open_hash *ht);
/netbsd-src/usr.sbin/ldpd/
H A Dfsm.c54 run_ldp_hello(const struct ldp_pdu * pduid, const struct hello_tlv * ht, in run_ldp_hello() argument
64 if ((!pduid) || (!ht)) in run_ldp_hello()
68 debugp("Hello: Type: 0x%.4X Length: %.2d ID: %.8X\n", ht->type, in run_ldp_hello()
69 ht->length, ht->messageid); in run_ldp_hello()
71 if (ht->length <= 4) /* Common hello parameters */ in run_ldp_hello()
74 " Hold time: %d\n", ntohs(ht->ch.type), ntohs(ht->ch.length), in run_ldp_hello()
75 ht->ch.holdtime); in run_ldp_hello()
81 trtlv = (const struct transport_address_tlv *)(ht + 1); in run_ldp_hello()
120 if (ht->ch.holdtime != 0) in run_ldp_hello()
121 hi->keepalive = ntohs(ht->ch.holdtime); in run_ldp_hello()
[all …]
/netbsd-src/external/gpl3/gdb/dist/gdb/stubs/
H A Dsparc-stub.c468 struct hard_trap_info *ht; in set_debug_traps() local
470 for (ht = hard_trap_info; ht->tt && ht->signo; ht++) in set_debug_traps()
471 exceptionHandler(ht->tt, trap_low); in set_debug_traps()
509 struct hard_trap_info *ht; in computeSignal() local
511 for (ht = hard_trap_info; ht->tt && ht->signo; ht++) in computeSignal()
512 if (ht->tt == tt) in computeSignal()
513 return ht->signo; in computeSignal()
/netbsd-src/external/ibm-public/postfix/dist/src/postconf/
H A Dpostconf_main.c191 PCF_PARAM_INFO **ht; in pcf_show_parameters() local
202 for (ht = list; *ht; ht++) in pcf_show_parameters()
203 if (param_class & PCF_PARAM_INFO_NODE(*ht)->flags) in pcf_show_parameters()
204 pcf_print_parameter(fp, mode, PCF_PARAM_INFO_NAME(*ht), in pcf_show_parameters()
205 PCF_PARAM_INFO_NODE(*ht)); in pcf_show_parameters()

12345678910>>...14