| /freebsd/contrib/unbound/util/storage/ |
| H A D | lruhash.c | 67 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 in lruhash_create() 99 bin_delete(struct lruhash * table,struct lruhash_bin * bin) bin_delete() argument 118 bin_split(struct lruhash * table,struct lruhash_bin * newa,int newmask) bin_split() argument 154 lruhash_delete(struct lruhash * table) lruhash_delete() argument 183 reclaim_space(struct lruhash * table,struct lruhash_entry ** list) reclaim_space() argument 219 bin_find_entry(struct lruhash * table,struct lruhash_bin * bin,hashvalue_type hash,void * key,size_t * collisions) bin_find_entry() argument 236 table_grow(struct lruhash * table) table_grow() argument 271 lru_front(struct lruhash * table,struct lruhash_entry * entry) lru_front() argument 282 lru_remove(struct lruhash * table,struct lruhash_entry * entry) lru_remove() argument 293 lru_touch(struct lruhash * table,struct lruhash_entry * entry) lru_touch() argument 305 lruhash_insert(struct lruhash * table,hashvalue_type hash,struct lruhash_entry * entry,void * data,void * cb_arg) lruhash_insert() argument 364 lruhash_lookup(struct lruhash * table,hashvalue_type hash,void * key,int wr) lruhash_lookup() argument 386 lruhash_remove(struct lruhash * table,hashvalue_type hash,void * key) lruhash_remove() argument 424 bin_clear(struct lruhash * table,struct lruhash_bin * bin) bin_clear() argument 446 lruhash_clear(struct lruhash * table) lruhash_clear() argument 467 lruhash_status(struct lruhash * table,const char * id,int extended) lruhash_status() argument 501 lruhash_get_mem(struct lruhash * table) lruhash_get_mem() argument 524 lruhash_setmarkdel(struct lruhash * table,lruhash_markdelfunc_type md) lruhash_setmarkdel() argument 532 lruhash_update_space_used(struct lruhash * table,void * cb_arg,int diff_size) lruhash_update_space_used() argument 595 lru_demote(struct lruhash * table,struct lruhash_entry * entry) lru_demote() argument 618 lruhash_insert_or_retrieve(struct lruhash * table,hashvalue_type hash,struct lruhash_entry * entry,void * data,void * cb_arg) lruhash_insert_or_retrieve() argument [all...] |
| /freebsd/sys/dev/vmware/vmci/ |
| H A D | vmci_hashtable.c | 21 static int hashtable_unlink_entry(struct vmci_hashtable *table, 23 static bool vmci_hashtable_entry_exists_locked(struct vmci_hashtable *table, 45 struct vmci_hashtable *table; in vmci_hashtable_create() local 47 table = vmci_alloc_kernel_mem(sizeof(*table), in vmci_hashtable_create() 49 if (table == NULL) in vmci_hashtable_create() 51 memset(table, 0, sizeof(*table)); in vmci_hashtable_create() 53 table->entries = vmci_alloc_kernel_mem(sizeof(*table->entries) * size, in vmci_hashtable_create() 55 if (table->entries == NULL) { in vmci_hashtable_create() 56 vmci_free_kernel_mem(table, sizeof(*table)); in vmci_hashtable_create() 59 memset(table->entries, 0, sizeof(*table->entries) * size); in vmci_hashtable_create() [all …]
|
| /freebsd/crypto/heimdal/lib/roken/ |
| H A D | rtbl.c | 69 rtbl_set_flags (rtbl_t table, unsigned int flags) in rtbl_set_flags() argument 71 table->flags = flags; in rtbl_set_flags() 75 rtbl_get_flags (rtbl_t table) in rtbl_get_flags() argument 77 return table->flags; in rtbl_get_flags() 81 rtbl_get_column_by_id (rtbl_t table, unsigned int id) in rtbl_get_column_by_id() argument 84 for(i = 0; i < table->num_columns; i++) in rtbl_get_column_by_id() 85 if(table->columns[i]->column_id == id) in rtbl_get_column_by_id() 86 return table->columns[i]; in rtbl_get_column_by_id() 91 rtbl_get_column (rtbl_t table, const char *column) in rtbl_get_column() argument 94 for(i = 0; i < table->num_columns; i++) in rtbl_get_column() [all …]
|
| /freebsd/usr.sbin/bhyve/ |
| H A D | basl.c | 97 basl_dump_table(const struct basl_table *const table, const bool mem) in basl_dump_table() argument 99 const ACPI_TABLE_HEADER *const header = table->data; in basl_dump_table() 103 data = table->data; in basl_dump_table() 105 data = vm_map_gpa(table->ctx, BHYVE_ACPI_BASE + table->off, in basl_dump_table() 106 table->len); in basl_dump_table() 113 BHYVE_ACPI_BASE + table->off, mem ? "Memory" : "FwCfg"); in basl_dump_table() 114 hexdump(data, table->len, NULL, 0); in basl_dump_table() 122 struct basl_table *table; in basl_dump() local 124 STAILQ_FOREACH(table, &basl_tables, chain) { in basl_dump() 125 BASL_EXEC(basl_dump_table(table, mem)); in basl_dump() [all …]
|
| /freebsd/contrib/kyua/utils/text/ |
| H A D | table_test.cpp | 58 const text::table& table) in table_formatter_check() argument 60 ATF_REQUIRE_EQ(expected, text::join(formatter.format(table), "\n") + "\n"); in table_formatter_check() 68 ATF_REQUIRE_EQ(5, text::table(5).ncolumns()); in ATF_TEST_CASE_BODY() 69 ATF_REQUIRE_EQ(10, text::table(10).ncolumns()); in ATF_TEST_CASE_BODY() 83 text::table table(2); in ATF_TEST_CASE_BODY() local 84 table.add_row(row1); in ATF_TEST_CASE_BODY() 85 table.add_row(row2); in ATF_TEST_CASE_BODY() 87 ATF_REQUIRE_EQ(4, table.column_width(0)); in ATF_TEST_CASE_BODY() 88 ATF_REQUIRE_EQ(8, table.column_width(1)); in ATF_TEST_CASE_BODY() 102 text::table table(2); in ATF_TEST_CASE_BODY() local [all …]
|
| /freebsd/sys/contrib/dev/iwlwifi/fw/ |
| H A D | dump.c | 102 struct iwl_umac_error_event_table table = {}; in iwl_fwrt_dump_umac_error_log() local 111 iwl_trans_read_mem_bytes(trans, base, &table, sizeof(table)); in iwl_fwrt_dump_umac_error_log() 113 if (table.valid) in iwl_fwrt_dump_umac_error_log() 114 fwrt->dump.umac_err_id = table.error_id; in iwl_fwrt_dump_umac_error_log() 116 if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) { in iwl_fwrt_dump_umac_error_log() 119 fwrt->trans->status, table.valid); in iwl_fwrt_dump_umac_error_log() 122 if ((table.error_id & ~FW_SYSASSERT_CPU_MASK) == in iwl_fwrt_dump_umac_error_log() 129 IWL_ERR(fwrt, "0x%08X | %s\n", table.error_id, in iwl_fwrt_dump_umac_error_log() 130 iwl_fw_lookup_assert_desc(table.error_id)); in iwl_fwrt_dump_umac_error_log() 131 IWL_ERR(fwrt, "0x%08X | umac branchlink1\n", table.blink1); in iwl_fwrt_dump_umac_error_log() [all …]
|
| /freebsd/sys/contrib/openzfs/module/os/linux/spl/ |
| H A D | spl-tsd.c | 99 tsd_hash_search(tsd_hash_table_t *table, uint_t key, pid_t pid) in tsd_hash_search() argument 106 hash = hash_long((ulong_t)key * (ulong_t)pid, table->ht_bits); in tsd_hash_search() 107 bin = &table->ht_bins[hash]; in tsd_hash_search() 157 tsd_hash_add(tsd_hash_table_t *table, uint_t key, pid_t pid, void *value) in tsd_hash_add() argument 164 ASSERT0P(tsd_hash_search(table, key, pid)); in tsd_hash_add() 178 spin_lock(&table->ht_lock); in tsd_hash_add() 181 dtor_entry = tsd_hash_search(table, entry->he_key, DTOR_PID); in tsd_hash_add() 186 pid_entry = tsd_hash_search(table, PID_KEY, entry->he_pid); in tsd_hash_add() 189 hash = hash_long((ulong_t)key * (ulong_t)pid, table->ht_bits); in tsd_hash_add() 190 bin = &table->ht_bins[hash]; in tsd_hash_add() [all …]
|
| /freebsd/contrib/wpa/src/utils/ |
| H A D | eloop.c | 72 struct eloop_sock *table; member 126 static void eloop_trace_sock_add_ref(struct eloop_sock_table *table) in eloop_trace_sock_add_ref() argument 130 if (table == NULL || table->table == NULL) in eloop_trace_sock_add_ref() 132 for (i = 0; i < table->count; i++) { in eloop_trace_sock_add_ref() 133 wpa_trace_add_ref(&table->table[i], eloop, in eloop_trace_sock_add_ref() 134 table->table[i].eloop_data); in eloop_trace_sock_add_ref() 135 wpa_trace_add_ref(&table->table[i], user, in eloop_trace_sock_add_ref() 136 table->table[i].user_data); in eloop_trace_sock_add_ref() 141 static void eloop_trace_sock_remove_ref(struct eloop_sock_table *table) in eloop_trace_sock_remove_ref() argument 145 if (table == NULL || table->table == NULL) in eloop_trace_sock_remove_ref() [all …]
|
| /freebsd/sys/ofed/drivers/infiniband/core/ |
| H A D | ib_cache.c | 53 u16 table[0]; member 176 struct ib_gid_table *table, int ix, in write_gid() argument 181 __releases(&table->rwlock) __acquires(&table->rwlock) in write_gid() 192 table->data_vec[ix].props |= GID_TABLE_ENTRY_INVALID; in write_gid() 193 write_unlock_irq(&table->rwlock); in write_gid() 199 &table->data_vec[ix].context); in write_gid() 202 &table->data_vec[ix].context); in write_gid() 203 write_lock_irq(&table->rwlock); in write_gid() 206 old_net_dev = table->data_vec[ix].attr.ndev; in write_gid() 207 old_gid_type = table->data_vec[ix].attr.gid_type; in write_gid() [all …]
|
| /freebsd/contrib/ofed/opensm/opensm/ |
| H A D | st.c | 104 #define EQUAL(table,x,y) ((x)==(y) || (*table->type->compare)(((void*)x),((void *)y)) == 0) argument 106 #define do_hash(key,table) (unsigned int)(*(table)->type->hash)(((void*)key)) argument 107 #define do_hash_bin(key,table) (do_hash(key, table)%(table)->num_bins) argument 234 void st_free_table(st_table *table) in st_free_table() argument 239 for (i = 0; i < table->num_bins; i++) { in st_free_table() 240 ptr = table->bins[i]; in st_free_table() 247 free(table->bins); in st_free_table() 248 free(table); in st_free_table() 251 #define PTR_NOT_EQUAL(table, ptr, hash_val, key) \ argument 252 ((ptr) != 0 && (ptr->hash != (hash_val) || !EQUAL((table), (key), (ptr)->key))) [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/ |
| H A D | WebAssemblyInstrTable.td | 25 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 …]
|
| /freebsd/sys/dev/mlx4/mlx4_core/ |
| H A D | mlx4_icm.c | 250 int mlx4_table_get(struct mlx4_dev *dev, struct mlx4_icm_table *table, u32 obj, in mlx4_table_get() argument 253 u32 i = (obj & (table->num_obj - 1)) / in mlx4_table_get() 254 (MLX4_TABLE_CHUNK_SIZE / table->obj_size); in mlx4_table_get() 257 mutex_lock(&table->mutex); in mlx4_table_get() 259 if (table->icm[i]) { in mlx4_table_get() 260 ++table->icm[i]->refcount; in mlx4_table_get() 264 table->icm[i] = mlx4_alloc_icm(dev, MLX4_TABLE_CHUNK_SIZE >> PAGE_SHIFT, in mlx4_table_get() 265 (table->lowmem ? gfp : GFP_HIGHUSER) | in mlx4_table_get() 266 __GFP_NOWARN, table->coherent); in mlx4_table_get() 267 if (!table->icm[i]) { in mlx4_table_get() [all …]
|
| /freebsd/lib/libc/locale/ |
| H A D | collate.c | 78 __collate_load_tables_l(const char *encoding, struct xlocale_collate *table); 83 struct xlocale_collate *table = t; in destruct_collate() local 84 if (table->map && (table->maplen > 0)) { in destruct_collate() 85 (void) munmap(table->map, table->maplen); in destruct_collate() 100 struct xlocale_collate *table = calloc(sizeof(struct xlocale_collate), in __collate_load() local 102 if (table == NULL) in __collate_load() 104 table->header.header.destructor = destruct_collate; in __collate_load() 110 if (__collate_load_tables_l(encoding, table) != _LDP_LOADED) { in __collate_load() 111 xlocale_release(table); in __collate_load() 114 return (table); in __collate_load() [all …]
|
| /freebsd/stand/common/ |
| H A D | part.c | 228 ptable_gptread(struct ptable *table, void *dev, diskread_t dread) in ptable_gptread() argument 238 buf = malloc(table->sectorsize); in ptable_gptread() 241 tbl = malloc(table->sectorsize * MAXTBLSZ); in ptable_gptread() 248 ptable_close(table); in ptable_gptread() 249 table = NULL; in ptable_gptread() 254 phdr = gpt_checkhdr((struct gpt_hdr *)buf, 1, table->sectors - 1, in ptable_gptread() 255 table->sectorsize); in ptable_gptread() 260 table->sectorsize)); in ptable_gptread() 262 gpt_checktbl(phdr, tbl, size * table->sectorsize, in ptable_gptread() 263 table->sectors - 1) == 0) { in ptable_gptread() [all …]
|
| /freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/channel_program/lua_core/ |
| H A D | tst.lib_table.lua | 40 return table.unpack(res, 1, res.n) 60 local unpack = table.unpack 101 a = table.pack() 104 a = table.pack(table) 105 assert(a[1] == table and a.n == 1) 107 a = table.pack(nil, nil, nil, nil) 117 local s, e = pcall(table.sort, t, f) 136 table.sort(a) 143 table.sort(t) 172 table.sort(a) [all …]
|
| /freebsd/contrib/ntp/libntp/lib/isc/ |
| H A D | result.c | 119 resulttable *table; in register_table() local 129 table = malloc(sizeof(*table)); in register_table() 130 if (table == NULL) in register_table() 132 table->base = base; in register_table() 133 table->last = base + nresults - 1; in register_table() 134 table->text = txt; in register_table() 135 table->msgcat = msgcat; in register_table() 136 table->set = set; in register_table() 137 ISC_LINK_INIT(table, link); in register_table() 141 ISC_LIST_APPEND(tables, table, link); in register_table() [all …]
|
| /freebsd/lib/libsysdecode/ |
| H A D | support.c | 34 lookup_value(struct name_table *table, uintmax_t val) in lookup_value() argument 37 for (; table->str != NULL; table++) in lookup_value() 38 if (table->val == val) in lookup_value() 39 return (table->str); in lookup_value() 50 print_mask_part(FILE *fp, struct name_table *table, uintmax_t *valp, in print_mask_part() argument 56 for (; table->str != NULL; table++) { in print_mask_part() 57 if ((table->val & rem) == table->val) { in print_mask_part() 62 if (table->val == 0 && *valp != 0) in print_mask_part() 64 fprintf(fp, "%s%s", *printed ? "|" : "", table->str); in print_mask_part() 66 rem &= ~table->val; in print_mask_part() [all …]
|
| /freebsd/sys/dev/mlx5/mlx5_core/ |
| H A D | mlx5_rl.c | 41 static struct mlx5_rl_entry *find_rl_entry(struct mlx5_rl_table *table, in find_rl_entry() argument 48 for (i = 0; i < table->max_size; i++) { in find_rl_entry() 49 entry = table->rl_entry + i; in find_rl_entry() 95 const struct mlx5_rl_table *table = &dev->priv.rl_table; in mlx5_rl_is_in_range() local 97 return (rate <= table->max_rate && rate >= table->min_rate && in mlx5_rl_is_in_range() 104 struct mlx5_rl_table *table = &dev->priv.rl_table; in mlx5_rl_add_rate() local 108 mutex_lock(&table->rl_lock); in mlx5_rl_add_rate() 112 rate, table->min_rate, table->max_rate); in mlx5_rl_add_rate() 117 entry = find_rl_entry(table, rate, burst); in mlx5_rl_add_rate() 120 table->max_size); in mlx5_rl_add_rate() [all …]
|
| /freebsd/sys/geom/part/ |
| H A D | g_part.c | 247 g_part_geometry(struct g_part_table *table, struct g_consumer *cp, in g_part_geometry() argument 257 table->gpt_fixgeom = 0; in g_part_geometry() 258 table->gpt_heads = 0; in g_part_geometry() 259 table->gpt_sectors = 0; in g_part_geometry() 271 table->gpt_sectors == 1)) { in g_part_geometry() 273 table->gpt_heads = heads; in g_part_geometry() 274 table->gpt_sectors = sectors; in g_part_geometry() 283 table->gpt_heads = 255; in g_part_geometry() 284 table->gpt_sectors = 63; in g_part_geometry() 287 table->gpt_fixgeom = 1; in g_part_geometry() [all …]
|
| H A D | g_part_apm.c | 215 struct g_part_apm_table *table; in g_part_apm_add() local 219 table = (struct g_part_apm_table *)basetable; in g_part_apm_add() 221 entry->ent.ent_pmblkcnt = table->self.ent_pmblkcnt; in g_part_apm_add() 238 if (baseentry->gpe_index >= table->self.ent_pmblkcnt) in g_part_apm_add() 239 table->self.ent_pmblkcnt = baseentry->gpe_index + 1; in g_part_apm_add() 240 KASSERT(table->self.ent_size >= table->self.ent_pmblkcnt, in g_part_apm_add() 242 KASSERT(table->self.ent_size > baseentry->gpe_index, in g_part_apm_add() 251 struct g_part_apm_table *table; in g_part_apm_create() local 258 table = (struct g_part_apm_table *)basetable; in g_part_apm_create() 270 table->ddr.ddr_sig = APM_DDR_SIG; in g_part_apm_create() [all …]
|
| H A D | g_part_gpt.c | 122 static int g_part_gpt_setunset(struct g_part_table *table, 349 gpt_create_pmbr(struct g_part_gpt_table *table, struct g_provider *pp) in gpt_create_pmbr() argument 352 bzero(table->mbr + DOSPARTOFF, DOSPARTSIZE * NDOSPART); in gpt_create_pmbr() 353 gpt_write_mbr_entry(table->mbr, 0, 0xee, 1, in gpt_create_pmbr() 355 le16enc(table->mbr + DOSMAGICOFFSET, DOSMAGIC); in gpt_create_pmbr() 365 gpt_is_bootcamp(struct g_part_gpt_table *table, const char *provname) in gpt_is_bootcamp() argument 369 p = table->mbr + DOSPARTOFF; in gpt_is_bootcamp() 386 struct g_part_gpt_table *table; in gpt_update_bootcamp() local 389 table = (struct g_part_gpt_table *)basetable; in gpt_update_bootcamp() 393 if (table->mbr[DOSPARTOFF + DOSPARTSIZE * index]) in gpt_update_bootcamp() [all …]
|
| /freebsd/sys/dev/mthca/ |
| H A D | mthca_memfree.c | 221 int mthca_table_get(struct mthca_dev *dev, struct mthca_icm_table *table, int obj) in mthca_table_get() argument 223 int i = (obj & (table->num_obj - 1)) * table->obj_size / MTHCA_TABLE_CHUNK_SIZE; in mthca_table_get() 226 mutex_lock(&table->mutex); in mthca_table_get() 228 if (table->icm[i]) { in mthca_table_get() 229 ++table->icm[i]->refcount; in mthca_table_get() 233 table->icm[i] = mthca_alloc_icm(dev, MTHCA_TABLE_CHUNK_SIZE >> PAGE_SHIFT, in mthca_table_get() 234 (table->lowmem ? GFP_KERNEL : GFP_HIGHUSER) | in mthca_table_get() 235 __GFP_NOWARN, table->coherent); in mthca_table_get() 236 if (!table->icm[i]) { in mthca_table_get() 241 if (mthca_MAP_ICM(dev, table->icm[i], in mthca_table_get() [all …]
|
| /freebsd/release/scripts/ |
| H A D | pkgbase-stage.lua | 53 table.insert(selected, components["pkg"]) 54 table.insert(selected, components["base"]) 55 table.insert(selected, components["base-jail"]) 56 table.insert(selected, components["kernel"]) 57 table.insert(selected, components["kernel-dbg"]) 58 table.insert(selected, components["src"]) 59 table.insert(selected, components["tests"]) 61 table.insert(selected, components["lib" .. compat]) 65 table.insert(selected, components["pkg"]) 66 table.insert(selected, components["base"]) [all …]
|
| /freebsd/contrib/file/magic/Magdir/ |
| H A D | gpt | 5 # GPT Partition table patterns. 11 # partition table code (aka MBR). 15 # First, detect the MBR partition table 17 # (the other MBR detection code will then just print the MBR partition table) 36 >>>>>>>>>>>>>(454.l*8192) string EFI\ PART GPT partition table 38 >>>>>>>>>>>>>>&-8 use gpt-table 41 >>>>>>>>>>>>>>(454.l*4096) string EFI\ PART GPT partition table 43 >>>>>>>>>>>>>>>&-8 use gpt-table 46 >>>>>>>>>>>>>>>(454.l*2048) string EFI\ PART GPT partition table 48 >>>>>>>>>>>>>>>>&-8 use gpt-table [all …]
|
| /freebsd/contrib/netbsd-tests/ipf/regress/ |
| H A D | ip1 | 3 table role = ipf type = tree number = 1 5 table role = ipf type = tree number = 100 7 table role = nat type = tree number = 110 9 table role = auth type = tree number = 120 11 table role = count type = tree number = 130 14 table role = ipf type = hash number = 2 16 table role = ipf type = hash number = 200 18 table role = nat type = hash number = 210 20 table role = auth type = hash number = 220 22 table role = count type = hash number = 230 [all …]
|