Home
last modified time | relevance | path

Searched refs:table (Results 1 – 25 of 1860) sorted by relevance

12345678910>>...75

/openbsd-src/sbin/unwind/libunbound/util/storage/
H A Dlruhash.c67 struct lruhash* table = (struct lruhash*)calloc(1, in lruhash_create() local
69 if(!table) in lruhash_create()
71 lock_quick_init(&table->lock); in lruhash_create()
72 table->sizefunc = sizefunc; in lruhash_create()
73 table->compfunc = compfunc; in lruhash_create()
74 table->delkeyfunc = delkeyfunc; in lruhash_create()
75 table->deldatafunc = deldatafunc; in lruhash_create()
76 table->cb_arg = arg; in lruhash_create()
77 table->size = start_size; in lruhash_create()
78 table->size_mask = (int)(start_size-1); in lruhash_create()
[all …]
/openbsd-src/usr.sbin/unbound/util/storage/
H A Dlruhash.c67 struct lruhash* table = (struct lruhash*)calloc(1, in lruhash_create() local
69 if(!table) in lruhash_create()
71 lock_quick_init(&table->lock); in lruhash_create()
72 table->sizefunc = sizefunc; in lruhash_create()
73 table->compfunc = compfunc; in lruhash_create()
74 table->delkeyfunc = delkeyfunc; in lruhash_create()
75 table->deldatafunc = deldatafunc; in lruhash_create()
76 table->cb_arg = arg; in lruhash_create()
77 table->size = start_size; in lruhash_create()
78 table->size_mask = (int)(start_size-1); in lruhash_create()
[all …]
/openbsd-src/usr.sbin/unbound/testcode/
H A Dunitlruhash.c81 test_bin_find_entry(struct lruhash* table) in test_bin_find_entry() argument
97 unit_assert( bin_find_entry(table, &bin, h, k, NULL) == NULL ); in test_bin_find_entry()
105 unit_assert( bin_find_entry(table, &bin, myhash(13), k, NULL) == NULL ); in test_bin_find_entry()
109 unit_assert( bin_find_entry(table, &bin, h, k2, NULL) == NULL ); in test_bin_find_entry()
112 unit_assert( bin_find_entry(table, &bin, h, k, NULL) == &k->entry ); in test_bin_find_entry()
118 unit_assert( bin_find_entry(table, &bin, h, k, NULL) == NULL ); in test_bin_find_entry()
130 unit_assert( bin_find_entry(table, &bin, myhash(13), k, NULL) == NULL ); in test_bin_find_entry()
134 unit_assert( bin_find_entry(table, &bin, h, k2, NULL) == NULL ); in test_bin_find_entry()
137 unit_assert( bin_find_entry(table, &bin, h, k, NULL) == &k->entry ); in test_bin_find_entry()
140 unit_assert( bin_find_entry(table, &bin, k4->entry.hash, k4, NULL) in test_bin_find_entry()
[all …]
H A Dunitslabhash.c83 test_short_table(struct slabhash* table) in test_short_table() argument
93 slabhash_insert(table, myhash(12), &k->entry, d, NULL); in test_short_table()
94 slabhash_insert(table, myhash(14), &k2->entry, d2, NULL); in test_short_table()
96 unit_assert( slabhash_lookup(table, myhash(12), k, 0) == &k->entry); in test_short_table()
98 unit_assert( slabhash_lookup(table, myhash(14), k2, 0) == &k2->entry); in test_short_table()
100 slabhash_remove(table, myhash(12), k); in test_short_table()
101 slabhash_remove(table, myhash(14), k2); in test_short_table()
109 testadd(struct slabhash* table, testdata_type* ref[]) in testadd() argument
115 slabhash_insert(table, myhash(numtoadd), &key->entry, data, NULL); in testadd()
121 testremove(struct slabhash* table, testdata_type* ref[]) in testremove() argument
[all …]
/openbsd-src/gnu/usr.bin/binutils/bfd/
H A Dhash.c303 bfd_hash_table_init_n (table, newfunc, size) in bfd_hash_table_init_n() argument
304 struct bfd_hash_table *table; in bfd_hash_table_init_n()
314 table->memory = (PTR) objalloc_create ();
315 if (table->memory == NULL)
320 table->table = ((struct bfd_hash_entry **)
321 objalloc_alloc ((struct objalloc *) table->memory, alloc));
322 if (table->table == NULL)
327 memset ((PTR) table->table, 0, alloc);
328 table->size = size;
329 table->newfunc = newfunc;
[all …]
/openbsd-src/sys/dev/pci/drm/i915/gt/
H A Dintel_mocs.c25 const struct drm_i915_mocs_entry *table; member
491 struct drm_i915_mocs_table *table) in get_mocs_settings() argument
495 memset(table, 0, sizeof(struct drm_i915_mocs_table)); in get_mocs_settings()
497 table->unused_entries_index = I915_MOCS_PTE; in get_mocs_settings()
499 table->size = ARRAY_SIZE(mtl_mocs_table); in get_mocs_settings()
500 table->table = mtl_mocs_table; in get_mocs_settings()
501 table->n_entries = MTL_NUM_MOCS_ENTRIES; in get_mocs_settings()
502 table->uc_index = 9; in get_mocs_settings()
503 table->unused_entries_index = 1; in get_mocs_settings()
505 table->size = ARRAY_SIZE(pvc_mocs_table); in get_mocs_settings()
[all …]
/openbsd-src/gnu/usr.bin/binutils-2.17/bfd/
H A Dhash.c307 bfd_hash_table_init_n (struct bfd_hash_table *table, in bfd_hash_table_init_n() argument
318 table->memory = (void *) objalloc_create (); in bfd_hash_table_init_n()
319 if (table->memory == NULL) in bfd_hash_table_init_n()
324 table->table = objalloc_alloc ((struct objalloc *) table->memory, alloc); in bfd_hash_table_init_n()
325 if (table->table == NULL) in bfd_hash_table_init_n()
330 memset ((void *) table->table, 0, alloc); in bfd_hash_table_init_n()
331 table->size = size; in bfd_hash_table_init_n()
332 table->entsize = entsize; in bfd_hash_table_init_n()
333 table->newfunc = newfunc; in bfd_hash_table_init_n()
340 bfd_hash_table_init (struct bfd_hash_table *table, in bfd_hash_table_init() argument
[all …]
/openbsd-src/gnu/usr.bin/gcc/gcc/
H A Dhashtable.c83 hash_table *table; local
85 table = (hash_table *) xmalloc (sizeof (hash_table));
86 memset (table, 0, sizeof (hash_table));
89 gcc_obstack_init (&table->stack);
90 obstack_alignment_mask (&table->stack) = 0;
92 table->entries = (hashnode *) xcalloc (nslots, sizeof (hashnode));
93 table->nslots = nslots;
94 return table;
100 ht_destroy (table) in ht_destroy() argument
101 hash_table *table; in ht_destroy()
[all …]
/openbsd-src/gnu/gcc/libcpp/
H A Dsymtab.c57 hash_table *table; in ht_create() local
59 table = XCNEW (hash_table); in ht_create()
62 _obstack_begin (&table->stack, 0, 0, in ht_create()
66 obstack_alignment_mask (&table->stack) = 0; in ht_create()
68 table->entries = XCNEWVEC (hashnode, nslots); in ht_create()
69 table->entries_owned = true; in ht_create()
70 table->nslots = nslots; in ht_create()
71 return table; in ht_create()
77 ht_destroy (hash_table *table) in ht_destroy() argument
79 obstack_free (&table->stack, NULL); in ht_destroy()
[all …]
/openbsd-src/usr.bin/tmux/
H A Dkey-bindings.c105 struct key_table table_find, *table; in key_bindings_get_table() local
108 table = RB_FIND(key_tables, &key_tables, &table_find); in key_bindings_get_table()
109 if (table != NULL || !create) in key_bindings_get_table()
110 return (table); in key_bindings_get_table()
112 table = xmalloc(sizeof *table); in key_bindings_get_table()
113 table->name = xstrdup(name); in key_bindings_get_table()
114 RB_INIT(&table->key_bindings); in key_bindings_get_table()
115 RB_INIT(&table->default_key_bindings); in key_bindings_get_table()
117 table in key_bindings_get_table()
130 key_bindings_next_table(struct key_table * table) key_bindings_next_table() argument
136 key_bindings_unref_table(struct key_table * table) key_bindings_unref_table() argument
158 key_bindings_get(struct key_table * table,key_code key) key_bindings_get() argument
167 key_bindings_get_default(struct key_table * table,key_code key) key_bindings_get_default() argument
176 key_bindings_first(struct key_table * table) key_bindings_first() argument
182 key_bindings_next(__unused struct key_table * table,struct key_binding * bd) key_bindings_next() argument
191 struct key_table *table; key_bindings_add() local
232 struct key_table *table; key_bindings_remove() local
259 struct key_table *table; key_bindings_reset() local
291 struct key_table *table; key_bindings_remove_table() local
308 struct key_table *table; key_bindings_reset_table() local
325 struct key_table *table; key_bindings_init_done() local
[all...]
/openbsd-src/gnu/llvm/llvm/lib/Target/WebAssembly/
H A DWebAssemblyInstrTable.td25 defm TABLE_GET_#rc : I<(outs rc:$res), (ins table32_op:$table, I32:$i),
26 (outs), (ins table32_op:$table),
27 …cast<Intrinsic>("int_wasm_table_get_" # suffix) (WebAssemblyWrapper tglobaladdr:$table), I32:$i))],
28 "table.get\t$res, $table, $i",
29 "table.get\t$table",
33 defm TABLE_SET_#rc : I<(outs), (ins table32_op:$table, I32:$i, rc:$val),
34 (outs), (ins table32_op:$table),
35 …trinsic>("int_wasm_table_set_" # suffix) (WebAssemblyWrapper tglobaladdr:$table), I32:$i, rc:$val)…
36 "table.set\t$table, $i, $val",
37 "table.set\t$table",
[all …]
/openbsd-src/usr.sbin/smtpd/
H A Dtable_static.c35 static int table_static_config(struct table *);
36 static int table_static_add(struct table *, const char *, const char *);
37 static void table_static_dump(struct table *);
38 static int table_static_update(struct table *);
39 static int table_static_open(struct table *);
40 static int table_static_lookup(struct table *, enum table_service, const char *,
42 static int table_static_fetch(struct table *, enum table_service, char **);
43 static void table_static_close(struct table *);
156 table_static_config(struct table *t) in table_static_config()
188 table_static_add(struct table *table, const char *key, const char *val) in table_static_add() argument
[all …]
H A Dtable_proc.c46 table_proc_nextid(struct table *table) in table_proc_nextid() argument
48 struct table_proc_priv *priv = table->t_handle; in table_proc_nextid()
59 table_proc_send(struct table *table, const char *type, int service, in table_proc_send() argument
62 struct table_proc_priv *priv = table->t_handle; in table_proc_send()
68 table->t_name, type); in table_proc_send()
71 table_proc_nextid(table)); in table_proc_send()
76 fprintf(priv->out, "|%s\n", table_proc_nextid(table)); in table_proc_send()
83 table_proc_recv(struct table *table, const char *type) in table_proc_recv() argument
85 struct table_proc_priv *priv = table->t_handle; in table_proc_recv()
123 table_proc_open(struct table *table) in table_proc_open() argument
[all …]
H A Dtable_db.c30 static int table_db_config(struct table *);
31 static int table_db_update(struct table *);
32 static int table_db_open(struct table *);
33 static void *table_db_open2(struct table *);
34 static int table_db_lookup(struct table *, enum table_service, const char *, char **);
35 static int table_db_fetch(struct table *, enum table_service, char **);
36 static void table_db_close(struct table *);
76 table_db_config(struct table *table) in table_db_config() argument
80 handle = table_db_open2(table); in table_db_config()
89 table_db_update(struct table *table) in table_db_update() argument
[all …]
H A Druleset.c30 struct table *table; in ruleset_match_tag() local
39 table = table_find(env, r->table_tag); in ruleset_match_tag()
40 ret = table_match(table, service, evp->tag); in ruleset_match_tag()
51 struct table *table; in ruleset_match_from() local
85 table = table_find(env, r->table_from); in ruleset_match_from()
86 ret = table_match(table, service, key); in ruleset_match_from()
95 struct table *table; in ruleset_match_to() local
104 table = table_find(env, r->table_for); in ruleset_match_to()
105 ret = table_match(table, service, evp->dest.domain); in ruleset_match_to()
114 struct table *table; in ruleset_match_smtp_helo() local
[all …]
/openbsd-src/sys/dev/pci/drm/include/linux/
H A Dhashtable.h27 __hash_init(struct hlist_head *table, u_int size) in __hash_init() argument
32 INIT_HLIST_HEAD(&table[i]); in __hash_init()
36 __hash_empty(struct hlist_head *table, u_int size) in __hash_empty() argument
41 if (!hlist_empty(&table[i])) in __hash_empty()
48 #define __hash(table, key) &table[key % (nitems(table) - 1)] argument
50 #define hash_init(table) __hash_init(table, nitems(table)) argument
51 #define hash_add(table, node, key) \ argument
52 hlist_add_head(node, __hash(table, key))
54 #define hash_empty(table) __hash_empty(table, nitems(table)) argument
55 #define hash_for_each_possible(table, obj, member, key) \ argument
[all …]
/openbsd-src/gnu/usr.bin/binutils/gas/
H A Dhash.c58 struct hash_entry **table; member
89 ret->table = (struct hash_entry **) obstack_alloc (&ret->memory, alloc); in hash_new()
90 memset (ret->table, 0, alloc); in hash_new()
108 hash_die (struct hash_control *table) in hash_die() argument
110 obstack_free (&table->memory, 0); in hash_die()
111 free (table); in hash_die()
129 hash_lookup (struct hash_control *table, const char *key, in hash_lookup() argument
142 ++table->lookups; in hash_lookup()
160 index = hash % table->size; in hash_lookup()
161 list = table->table + index; in hash_lookup()
[all …]
/openbsd-src/gnu/usr.bin/binutils-2.17/gas/
H A Dhash.c54 struct hash_entry **table; member
119 ret->table = obstack_alloc (&ret->memory, alloc); in hash_new()
120 memset (ret->table, 0, alloc); in hash_new()
138 hash_die (struct hash_control *table) in hash_die() argument
140 obstack_free (&table->memory, 0); in hash_die()
141 free (table); in hash_die()
154 hash_lookup (struct hash_control *table, const char *key, size_t len, in hash_lookup() argument
166 ++table->lookups; in hash_lookup()
182 index = hash % table->size; in hash_lookup()
183 list = table->table + index; in hash_lookup()
[all …]
/openbsd-src/usr.bin/dig/lib/isc/
H A Dresult.c111 resulttable *table; in register_table() local
121 table = malloc(sizeof(*table)); in register_table()
122 if (table == NULL) in register_table()
124 table->base = base; in register_table()
125 table->last = base + nresults - 1; in register_table()
126 table->text = text; in register_table()
127 table->set = set; in register_table()
128 ISC_LINK_INIT(table, link); in register_table()
130 ISC_LIST_APPEND(tables, table, link); in register_table()
159 resulttable *table; in isc_result_totext() local
[all …]
/openbsd-src/sys/dev/pci/drm/amd/pm/powerplay/smumgr/
H A Dvegam_smumgr.c449 SMU75_Discrete_DpmTable *table) in vegam_populate_smc_mvdd_table() argument
459 table->SmioTable2.Pattern[level].Voltage = PP_HOST_TO_SMC_US( in vegam_populate_smc_mvdd_table()
462 table->SmioTable2.Pattern[level].Smio = in vegam_populate_smc_mvdd_table()
464 table->Smio[level] |= in vegam_populate_smc_mvdd_table()
467 table->SmioMask2 = data->mvdd_voltage_table.mask_low; in vegam_populate_smc_mvdd_table()
469 table->MvddLevelCount = (uint32_t) PP_HOST_TO_SMC_UL(count); in vegam_populate_smc_mvdd_table()
476 struct SMU75_Discrete_DpmTable *table) in vegam_populate_smc_vddci_table() argument
487 table->SmioTable1.Pattern[level].Voltage = PP_HOST_TO_SMC_US( in vegam_populate_smc_vddci_table()
489 table->SmioTable1.Pattern[level].Smio = (uint8_t) level; in vegam_populate_smc_vddci_table()
491 table->Smio[level] |= data->vddci_voltage_table.entries[level].smio_low; in vegam_populate_smc_vddci_table()
[all …]
H A Dpolaris10_smumgr.c432 SMU74_Discrete_DpmTable *table = &(smu_data->smc_state_table); in polaris10_populate_bapm_parameters_in_dpm_table() local
442 table->DefaultTdp = PP_HOST_TO_SMC_US((uint16_t)(cac_dtp_table->usTDP * 128)); in polaris10_populate_bapm_parameters_in_dpm_table()
443 table->TargetTdp = PP_HOST_TO_SMC_US((uint16_t)(cac_dtp_table->usTDP * 128)); in polaris10_populate_bapm_parameters_in_dpm_table()
449 table->TemperatureLimitEdge = PP_HOST_TO_SMC_US( in polaris10_populate_bapm_parameters_in_dpm_table()
451 table->TemperatureLimitHotspot = PP_HOST_TO_SMC_US( in polaris10_populate_bapm_parameters_in_dpm_table()
453 table->FanGainEdge = PP_HOST_TO_SMC_US( in polaris10_populate_bapm_parameters_in_dpm_table()
455 table->FanGainHotspot = PP_HOST_TO_SMC_US( in polaris10_populate_bapm_parameters_in_dpm_table()
464 table->BAPMTI_R[i][j][k] = PP_HOST_TO_SMC_US(*pdef1); in polaris10_populate_bapm_parameters_in_dpm_table()
465 table->BAPMTI_RC[i][j][k] = PP_HOST_TO_SMC_US(*pdef2); in polaris10_populate_bapm_parameters_in_dpm_table()
478 SMU74_Discrete_DpmTable *table = &(smu_data->smc_state_table); in polaris10_populate_zero_rpm_parameters() local
[all …]
/openbsd-src/usr.sbin/relayd/
H A Dhce.c80 struct table *table; in hce_setup_events() local
89 TAILQ_FOREACH(table, env->sc_tables, entry) { in hce_setup_events()
90 if (!(table->conf.flags & F_TLS) || in hce_setup_events()
91 table->tls_cfg != NULL) in hce_setup_events()
93 table->tls_cfg = tls_config_new(); in hce_setup_events()
94 if (table->tls_cfg == NULL) in hce_setup_events()
96 tls_config_insecure_noverifycert(table->tls_cfg); in hce_setup_events()
97 tls_config_insecure_noverifyname(table->tls_cfg); in hce_setup_events()
105 struct table *table; in hce_disable_events() local
109 TAILQ_FOREACH(table, env->sc_tables, entry) { in hce_disable_events()
[all …]
/openbsd-src/usr.bin/less/
H A Dposition.c25 static off_t *table = NULL; /* The position table */ variable
52 return (table[where]); in position()
67 table[i-1] = table[i]; in add_forw_pos()
68 table[sc_height - 1] = pos; in add_forw_pos()
83 table[i] = table[i-1]; in add_back_pos()
84 table[0] = pos; in add_back_pos()
96 table[i] = -1; in pos_clear()
113 if (table != NULL) { in pos_init()
115 free(table); in pos_init()
119 table = ecalloc(sc_height, sizeof (off_t)); in pos_init()
[all …]
/openbsd-src/sys/netinet/
H A Din_pcb.c150 in_pcbhash(struct inpcbtable *table, u_int rdomain, in in_pcbhash() argument
157 SipHash24_Init(&ctx, &table->inpt_key); in in_pcbhash()
167 in_pcblhash(struct inpcbtable *table, u_int rdomain, u_short lport) in in_pcblhash() argument
172 SipHash24_Init(&ctx, &table->inpt_lkey); in in_pcblhash()
179 in_pcbinit(struct inpcbtable *table, int hashsize) in in_pcbinit() argument
181 mtx_init(&table->inpt_mtx, IPL_SOFTNET); in in_pcbinit()
182 TAILQ_INIT(&table->inpt_queue); in in_pcbinit()
183 table->inpt_hashtbl = hashinit(hashsize, M_PCB, M_WAITOK, in in_pcbinit()
184 &table->inpt_mask); in in_pcbinit()
185 table in in_pcbinit()
231 in_pcballoc(struct socket * so,struct inpcbtable * table,int wait) in_pcballoc() argument
352 struct inpcbtable *table = inp->inp_table; in_pcbbind() local
368 struct inpcbtable *table = inp->inp_table; in_pcbaddrisavail_lock() local
446 struct inpcbtable *table = inp->inp_table; in_pcbpickport() local
507 struct inpcbtable *table = inp->inp_table; in_pcbconnect() local
585 struct inpcbtable *table = inp->inp_table; in_pcbdetach() local
720 in_pcbnotifyall(struct inpcbtable * table,const struct sockaddr_in * dst,u_int rtable,int errno,void (* notify)(struct inpcb *,int)) in_pcbnotifyall() argument
821 in_pcblookup_local_lock(struct inpcbtable * table,const void * laddrp,u_int lport_arg,int flags,u_int rtable,int lock) in_pcblookup_local_lock() argument
1014 struct inpcbtable *table = inp->inp_table; in_pcbhash_insert() local
1038 in_pcbhash_lookup(struct inpcbtable * table,uint64_t hash,u_int rdomain,const struct in_addr * faddr,u_short fport,const struct in_addr * laddr,u_short lport) in_pcbhash_lookup() argument
1073 in_pcbresize(struct inpcbtable * table,int hashsize) in_pcbresize() argument
1125 in_pcblookup_lock(struct inpcbtable * table,struct in_addr faddr,u_int fport,struct in_addr laddr,u_int lport,u_int rtable,int lock) in_pcblookup_lock() argument
1159 in_pcblookup(struct inpcbtable * table,struct in_addr faddr,u_int fport,struct in_addr laddr,u_int lport,u_int rtable) in_pcblookup() argument
1174 in_pcblookup_listen(struct inpcbtable * table,struct in_addr laddr,u_int lport_arg,struct mbuf * m,u_int rtable) in_pcblookup_listen() argument
1243 struct inpcbtable *table = inp->inp_table; in_pcbset_rtableid() local
1264 struct inpcbtable *table = inp->inp_table; in_pcbset_laddr() local
1293 struct inpcbtable *table = inp->inp_table; in_pcbunset_faddr() local
1310 struct inpcbtable *table = inp->inp_table; in_pcbunset_laddr() local
[all...]
/openbsd-src/regress/sys/net/pf_table/
H A DMakefile8 table-ref.conf \
9 table-pgone.out \
10 table-persist.out \
11 table-ref.out \
12 table-refgone.out
17 ${SUDO} pfctl -qt __regress_tbl -T add -f ${.CURDIR}/table.in
27 for i in `cat ${.CURDIR}/table.hit`; do \
35 for i in `cat ${.CURDIR}/table.miss`; do \
60 table-pgone.out:
68 table-persist.out:
[all …]

12345678910>>...75