| /freebsd/stand/efi/libefi/ |
| H A D | handles.c | 46 int idx, unit; in efi_register_handles() local 48 idx = nentries; in efi_register_handles() 54 for (unit = 0; idx < nentries; idx++, unit++) { in efi_register_handles() 55 entry[idx].handle = handles[unit]; in efi_register_handles() 57 entry[idx].alias = aliases[unit]; in efi_register_handles() 59 entry[idx].alias = NULL; in efi_register_handles() 60 entry[idx].dev = sw; in efi_register_handles() 61 entry[idx].unit = unit; in efi_register_handles() 69 int idx; in efi_find_handle() local 71 for (idx = 0; idx < nentries; idx++) { in efi_find_handle() [all …]
|
| /freebsd/crypto/openssl/crypto/camellia/asm/ |
| H A D | cmll-x86.pl | 57 $idx="esi"; 93 &xor ($t0,$idx); # t0^=key[0] 95 &movz ($idx,&HB($t0)); # (t0>>8)&0xff 96 &mov ($t3,&DWP($SBOX3_3033,$Tbl,$idx,8)); # t3=SBOX3_3033[0] 97 &movz ($idx,&LB($t0)); # (t0>>0)&0xff 98 &xor ($t3,&DWP($SBOX4_4404,$Tbl,$idx,8)); # t3^=SBOX4_4404[0] 100 &movz ($idx,&LB($t1)); # (t1>>0)&0xff 101 &mov ($t2,&DWP($SBOX1_1110,$Tbl,$idx,8)); # t2=SBOX1_1110[1] 102 &movz ($idx,&HB($t0)); # (t0>>24)&0xff 103 &xor ($t3,&DWP($SBOX1_1110,$Tbl,$idx,8)); # t3^=SBOX1_1110[0] [all …]
|
| /freebsd/contrib/llvm-project/libcxx/src/ |
| H A D | string.cpp | 107 inline V as_integer_helper(const string& func, const S& str, size_t* idx, int base, F f) { in as_integer_helper() argument 118 if (idx) in as_integer_helper() 119 *idx = static_cast<size_t>(ptr - p); in as_integer_helper() 124 inline V as_integer(const string& func, const S& s, size_t* idx, int base); 128 inline int as_integer(const string& func, const string& s, size_t* idx, int base) { in as_integer() argument 130 long r = as_integer_helper<long>(func, s, idx, base, strtol); in as_integer() 137 inline long as_integer(const string& func, const string& s, size_t* idx, int base) { in as_integer() argument 138 return as_integer_helper<long>(func, s, idx, base, strtol); in as_integer() 142 inline unsigned long as_integer(const string& func, const string& s, size_t* idx, int base) { in as_integer() argument 143 return as_integer_helper<unsigned long>(func, s, idx, base, strtoul); in as_integer() [all …]
|
| /freebsd/sys/kern/ |
| H A D | kern_switch.c | 263 #define CHECK_IDX(idx) ({ \ argument 264 __typeof(idx) _idx __unused = (idx); \ 266 ("%s: %s out of range: %d", __func__, __STRING(idx), _idx)); \ 270 typedef uintptr_t runq_sw_op(int idx, int sw_idx, rqsw_t sw_bit, 272 static inline uintptr_t runq_sw_apply(struct runq *rq, int idx, 275 static inline uintptr_t runq_sw_set_not_empty_op(int idx, int sw_idx, 277 static inline uintptr_t runq_sw_set_empty_op(int idx, int sw_idx, 279 static inline uintptr_t runq_sw_is_empty_op(int idx, int sw_idx, 283 static inline void runq_sw_set_not_empty(struct runq *rq, int idx); 284 static inline void runq_sw_set_empty(struct runq *rq, int idx); [all …]
|
| /freebsd/sys/dev/drm2/ |
| H A D | drm_buffer.c | 47 int idx; in drm_buffer_alloc() local 55 for (idx = 0; idx < nr_pages; ++idx) { in drm_buffer_alloc() 56 (*buf)->data[idx] = in drm_buffer_alloc() 57 malloc(min(PAGE_SIZE, size - idx * PAGE_SIZE), in drm_buffer_alloc() 76 int idx; in drm_buffer_copy_from_user() local 85 for (idx = 0; idx < nr_pages; ++idx) { in drm_buffer_copy_from_user() 87 if (DRM_COPY_FROM_USER(buf->data[idx], in drm_buffer_copy_from_user() 88 (char *)user_data + idx * PAGE_SIZE, in drm_buffer_copy_from_user() 89 min(PAGE_SIZE, size - idx * PAGE_SIZE))) { in drm_buffer_copy_from_user() 92 user_data, buf, idx); in drm_buffer_copy_from_user() [all …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_flat_map.h | 34 bool contains(uptr idx) const { in contains() argument 35 CHECK_LT(idx, kSize); in contains() 39 T &operator[](uptr idx) { 40 DCHECK_LT(idx, kSize); 41 return map_[idx]; 44 const T &operator[](uptr idx) const { 45 DCHECK_LT(idx, kSize); 46 return map_[idx]; 95 bool contains(uptr idx) const { in contains() argument 96 CHECK_LT(idx, kSize in contains() 117 Get(uptr idx) Get() argument 123 GetOrCreate(uptr idx) GetOrCreate() argument 139 Create(uptr idx) Create() argument [all...] |
| H A D | sanitizer_bitvector.h | 33 bool setBit(uptr idx) { in setBit() argument 35 bits_ |= mask(idx); in setBit() 40 bool clearBit(uptr idx) { in clearBit() argument 42 bits_ &= ~mask(idx); in clearBit() 46 bool getBit(uptr idx) const { return (bits_ & mask(idx)) != 0; } in getBit() argument 50 uptr idx = LeastSignificantSetBitIndex(bits_); in getAndClearFirstOne() local 51 clearBit(idx); in getAndClearFirstOne() 52 return idx; in getAndClearFirstOne() 99 basic_int_t mask(uptr idx) const { in mask() argument 100 CHECK_LT(idx, size()); in mask() [all …]
|
| /freebsd/contrib/ofed/librdmacm/ |
| H A D | indexer.c | 55 static int idx_grow(struct indexer *idx) in idx_grow() argument 60 if (idx->size >= IDX_ARRAY_SIZE) in idx_grow() 63 idx->array[idx->size] = calloc(IDX_ENTRY_SIZE, sizeof(union idx_entry)); in idx_grow() 64 if (!idx->array[idx->size]) in idx_grow() 67 entry = idx->array[idx->size]; in idx_grow() 68 start_index = idx->size << IDX_ENTRY_BITS; in idx_grow() 69 entry[IDX_ENTRY_SIZE - 1].next = idx->free_list; in idx_grow() 77 idx->free_list = start_index; in idx_grow() 78 idx->size++; in idx_grow() 86 int idx_insert(struct indexer *idx, void *item) in idx_insert() argument [all …]
|
| /freebsd/contrib/tcpdump/ |
| H A D | print-ssh.c | 27 u_int idx = 0; in ssh_print_version() local 29 if ( GET_U_1(pptr+idx) != 'S' ) in ssh_print_version() 31 idx++; in ssh_print_version() 32 if ( GET_U_1(pptr+idx) != 'S' ) in ssh_print_version() 34 idx++; in ssh_print_version() 35 if ( GET_U_1(pptr+idx) != 'H' ) in ssh_print_version() 37 idx++; in ssh_print_version() 38 if ( GET_U_1(pptr+idx) != '-' ) in ssh_print_version() 40 idx++; in ssh_print_version() 42 while (idx < len) { in ssh_print_version() [all …]
|
| /freebsd/sys/dev/dwc/ |
| H A D | dwc1000_dma.c | 184 txdesc_clear(struct dwc_softc *sc, int idx) in txdesc_clear() argument 188 sc->txdesc_ring[idx].addr1 = (uint32_t)(0); in txdesc_clear() 189 sc->txdesc_ring[idx].desc0 = 0; in txdesc_clear() 190 sc->txdesc_ring[idx].desc1 = 0; in txdesc_clear() 194 txdesc_setup(struct dwc_softc *sc, int idx, bus_addr_t paddr, in txdesc_setup() argument 215 sc->txdesc_ring[idx].addr1 = (uint32_t)(paddr); in txdesc_setup() 216 sc->txdesc_ring[idx].desc0 = desc0; in txdesc_setup() 217 sc->txdesc_ring[idx].desc1 = desc1; in txdesc_setup() 219 sc->txdesc_ring[idx].desc0 |= TDESC0_OWN; in txdesc_setup() 224 rxdesc_setup(struct dwc_softc *sc, int idx, bus_addr_t paddr) in rxdesc_setup() argument [all …]
|
| /freebsd/contrib/ntp/libntp/ |
| H A D | clocktime.c | 65 int32 y, tmp, idx, min; in clocktime() local 107 for (idx = 0; idx < 3; idx++) { in clocktime() 109 ystt[idx] = year_to_ntp(y + idx - 1); in clocktime() 111 test[idx] = ystt[idx] + tmp; in clocktime() 113 diff[idx] = test[idx] - rec_ui; in clocktime() 114 if (diff[idx] >= 0x80000000u) in clocktime() 115 diff[idx] = ~diff[idx] + 1; in clocktime() 118 for (min = 1, idx = 0; idx < 3; idx++) in clocktime() 119 if (diff[idx] < diff[min]) in clocktime() 120 min = idx; in clocktime()
|
| /freebsd/contrib/llvm-project/lldb/source/Core/ |
| H A D | Debugger.cpp | 293 constexpr uint32_t idx = ePropertyAutoConfirm; in GetAutoConfirm() local 295 idx, g_debugger_properties[idx].default_uint_value != 0); in GetAutoConfirm() 299 constexpr uint32_t idx = ePropertyDisassemblyFormat; in GetDisassemblyFormat() local 300 return GetPropertyAtIndexAs<FormatEntity::Entry>(idx, {}); in GetDisassemblyFormat() 304 constexpr uint32_t idx = ePropertyFrameFormat; in GetFrameFormat() local 305 return GetPropertyAtIndexAs<FormatEntity::Entry>(idx, {}); in GetFrameFormat() 309 constexpr uint32_t idx = ePropertyFrameFormatUnique; in GetFrameFormatUnique() local 310 return GetPropertyAtIndexAs<FormatEntity::Entry>(idx, {}); in GetFrameFormatUnique() 314 constexpr uint32_t idx = ePropertyStopDisassemblyMaxSize; in GetStopDisassemblyMaxSize() local 316 idx, g_debugger_properties[idx].default_uint_value); in GetStopDisassemblyMaxSize() [all …]
|
| /freebsd/sys/powerpc/aim/ |
| H A D | slb.c | 121 int idx; in make_new_leaf() local 123 idx = esid2idx(esid, parent->ua_level); in make_new_leaf() 124 KASSERT(parent->u.ua_child[idx] == NULL, ("Child already exists!")); in make_new_leaf() 132 idx = esid2idx(esid, child->ua_level); in make_new_leaf() 133 child->u.slb_entries[idx].slbv = slbv; in make_new_leaf() 134 child->u.slb_entries[idx].slbe = (esid << SLBE_ESID_SHIFT) | SLBE_VALID; in make_new_leaf() 135 setbit(&child->ua_alloc, idx); in make_new_leaf() 137 retval = &child->u.slb_entries[idx]; in make_new_leaf() 146 idx = esid2idx(esid, parent->ua_level); in make_new_leaf() 147 parent->u.ua_child[idx] = child; in make_new_leaf() [all …]
|
| /freebsd/lib/libc/iconv/ |
| H A D | citrus_none.c | 86 _csid_t *csid, _index_t *idx, char **s, size_t n, in _citrus_NONE_stdenc_mbtocs() argument 96 *idx = (_index_t)(unsigned char)*(*s)++; in _citrus_NONE_stdenc_mbtocs() 97 *nresult = *idx == 0 ? 0 : 1; in _citrus_NONE_stdenc_mbtocs() 100 hooks->uc_hook((unsigned int)*idx, hooks->data); in _citrus_NONE_stdenc_mbtocs() 107 char *s, size_t n, _csid_t csid, _index_t idx, void *ps __unused, in _citrus_NONE_stdenc_cstomb() argument 118 if ((idx & 0x000000FF) == idx) { in _citrus_NONE_stdenc_cstomb() 123 *s = (char)idx; in _citrus_NONE_stdenc_cstomb() 125 } else if ((idx & 0x0000FFFF) == idx) { in _citrus_NONE_stdenc_cstomb() 130 s[0] = (char)idx; in _citrus_NONE_stdenc_cstomb() 132 s[1] = (char)(idx >> 8); in _citrus_NONE_stdenc_cstomb() [all …]
|
| /freebsd/sys/dev/ata/ |
| H A D | ata-all.h | 536 #define ATA_IDX_INB(ch, idx) \ argument 537 ATA_INB(ch->r_io[idx].res, ch->r_io[idx].offset) 539 #define ATA_IDX_INW(ch, idx) \ argument 540 ATA_INW(ch->r_io[idx].res, ch->r_io[idx].offset) 542 #define ATA_IDX_INW_STRM(ch, idx) \ argument 543 ATA_INW_STRM(ch->r_io[idx].res, ch->r_io[idx].offset) 545 #define ATA_IDX_INL(ch, idx) \ argument 546 ATA_INL(ch->r_io[idx].res, ch->r_io[idx].offset) 548 #define ATA_IDX_INSW(ch, idx, addr, count) \ argument 549 ATA_INSW(ch->r_io[idx].res, ch->r_io[idx].offset, addr, count) [all …]
|
| /freebsd/contrib/lua/src/ |
| H A D | lua.h | 178 LUA_API int (lua_absindex) (lua_State *L, int idx); 180 LUA_API void (lua_settop) (lua_State *L, int idx); 181 LUA_API void (lua_pushvalue) (lua_State *L, int idx); 182 LUA_API void (lua_rotate) (lua_State *L, int idx, int n); 193 LUA_API int (lua_isnumber) (lua_State *L, int idx); 194 LUA_API int (lua_isstring) (lua_State *L, int idx); 195 LUA_API int (lua_iscfunction) (lua_State *L, int idx); 196 LUA_API int (lua_isinteger) (lua_State *L, int idx); 197 LUA_API int (lua_isuserdata) (lua_State *L, int idx); 198 LUA_API int (lua_type) (lua_State *L, int idx); [all …]
|
| /freebsd/contrib/llvm-project/lldb/include/lldb/Interpreter/ |
| H A D | OptionValueProperties.h | 80 GetPropertyAtIndex(size_t idx, 82 return ProtectedGetPropertyAtIndex(idx); 92 GetPropertyValueAtIndex(size_t idx, const ExecutionContext *exe_ctx) const; 105 GetPropertyAtIndexAsArgs(size_t idx, Args &args, 108 bool SetPropertyAtIndexFromArgs(size_t idx, const Args &args, 112 size_t idx, const ExecutionContext *exe_ctx = nullptr) const; 115 size_t idx, const ExecutionContext *exe_ctx = nullptr) const; 118 size_t idx, const ExecutionContext *exe_ctx = nullptr) const; 121 size_t idx, const ExecutionContext *exe_ctx = nullptr) const; 124 size_t idx, const ExecutionContext *exe_ctx = nullptr) const; [all …]
|
| /freebsd/sys/dev/nvmem/ |
| H A D | nvmem.c | 40 nvmem_get_cell_node(phandle_t node, int idx, phandle_t *cell) in nvmem_get_cell_node() argument 54 cell_node = OF_node_from_xref(p_cell[idx]); in nvmem_get_cell_node() 55 if (cell_node == p_cell[idx]) { in nvmem_get_cell_node() 58 p_cell[idx]); in nvmem_get_cell_node() 74 int rv, idx; in nvmem_get_cell_len() local 76 rv = ofw_bus_find_string_index(node, "nvmem-cell-names", name, &idx); in nvmem_get_cell_len() 80 rv = nvmem_get_cell_node(node, idx, &cell_node); in nvmem_get_cell_len() 95 nvmem_read_cell_by_idx(phandle_t node, int idx, void *cell, size_t buflen) in nvmem_read_cell_by_idx() argument 102 rv = nvmem_get_cell_node(node, idx, &cell_node); in nvmem_read_cell_by_idx() 110 idx); in nvmem_read_cell_by_idx() [all …]
|
| /freebsd/contrib/llvm-project/lldb/source/Utility/ |
| H A D | FileSpecList.cpp | 83 for (size_t idx = start_idx; idx < num_files; ++idx) { in FindFileIndex() local 84 const FileSpec &ith = get_ith(idx); in FindFileIndex() 89 return idx; in FindFileIndex() 92 return idx; in FindFileIndex() 104 [&](size_t idx) -> const FileSpec & { return m_files[idx]; }); in FindFileIndex() argument 111 [&](size_t idx) -> const FileSpec & { in FindFileIndex() argument 112 return m_files[idx]->GetSpecOnly(); in FindFileIndex() 173 for (size_t idx = start_idx; idx < num_files; ++idx) { in FindCompatibleIndex() local 174 const FileSpec &curr_file = m_files[idx]->GetSpecOnly(); in FindCompatibleIndex() 178 return idx; in FindCompatibleIndex() [all …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/tsan/rtl/ |
| H A D | tsan_sync.cpp | 48 u32 idx = block_alloc_.Alloc(&thr->proc()->block_cache); in AllocBlock() local 49 MBlock *b = block_alloc_.Map(idx); in AllocBlock() 56 *meta = idx | kFlagBlock; in AllocBlock() 75 u32 idx = *meta; in FreeRange() local 76 if (idx == 0) { in FreeRange() 82 while (idx != 0) { in FreeRange() 83 if (idx & kFlagBlock) { in FreeRange() 84 block_alloc_.Free(&proc->block_cache, idx & ~kFlagMask); in FreeRange() 86 } else if (idx & kFlagSync) { in FreeRange() 87 DCHECK(idx & kFlagSync); in FreeRange() [all …]
|
| /freebsd/crypto/openssl/test/ |
| H A D | x509_time_test.c | 405 static int test_x509_cmp_time(int idx) in test_x509_cmp_time() argument 411 t.type = x509_cmp_tests[idx].type; in test_x509_cmp_time() 412 t.data = (unsigned char *)(x509_cmp_tests[idx].data); in test_x509_cmp_time() 413 t.length = strlen(x509_cmp_tests[idx].data); in test_x509_cmp_time() 416 result = X509_cmp_time(&t, &x509_cmp_tests[idx].cmp_time); in test_x509_cmp_time() 417 if (!TEST_int_eq(result, x509_cmp_tests[idx].expected)) { in test_x509_cmp_time() 419 idx, x509_cmp_tests[idx].expected, result); in test_x509_cmp_time() 501 static int test_x509_time(int idx) in test_x509_time() argument 506 if (x509_format_tests[idx].set_string) { in test_x509_time() 510 TEST_info("test_x509_time(%d) failed: internal error\n", idx); in test_x509_time() [all …]
|
| /freebsd/sys/contrib/openzfs/module/zfs/ |
| H A D | btree.c | 120 uint32_t idx, uint32_t count) in zfs_btree_poison_node_at() argument 125 ASSERT3U(idx, >=, hdr->bth_count); in zfs_btree_poison_node_at() 126 ASSERT3U(idx, <=, BTREE_CORE_ELEMS); in zfs_btree_poison_node_at() 127 ASSERT3U(idx + count, <=, BTREE_CORE_ELEMS); in zfs_btree_poison_node_at() 130 node->btc_children[idx + i] = in zfs_btree_poison_node_at() 133 (void) memset(node->btc_elems + idx * size, 0x0f, count * size); in zfs_btree_poison_node_at() 135 ASSERT3U(idx, <=, tree->bt_leaf_cap); in zfs_btree_poison_node_at() 136 ASSERT3U(idx + count, <=, tree->bt_leaf_cap); in zfs_btree_poison_node_at() 139 (hdr->bth_first + idx) * size, 0x0f, count * size); in zfs_btree_poison_node_at() 142 (void) tree; (void) hdr; (void) idx; (void) count; in zfs_btree_poison_node_at() [all …]
|
| /freebsd/sys/compat/linuxkpi/common/src/ |
| H A D | linux_radix.c | 266 int idx; in radix_tree_delete() local 283 idx = radix_pos(index, 0); in radix_tree_delete() 284 item = node->slots[idx]; in radix_tree_delete() 295 node->slots[idx] = NULL; in radix_tree_delete() 307 idx = radix_pos(index, height); in radix_tree_delete() 326 int idx; in radix_tree_insert() local 380 idx = radix_pos(index, height); in radix_tree_insert() 381 if (node->slots[idx] == NULL) in radix_tree_insert() 383 node = node->slots[idx]; in radix_tree_insert() 387 for (idx = 0; idx != height; idx++) { in radix_tree_insert() [all …]
|
| /freebsd/sys/contrib/openzfs/include/ |
| H A D | libzdb.h | 1 #define ZDB_COMPRESS_NAME(idx) ((idx) < ZIO_COMPRESS_FUNCTIONS ? \ argument 2 zio_compress_table[(idx)].ci_name : "UNKNOWN") 3 #define ZDB_CHECKSUM_NAME(idx) ((idx) < ZIO_CHECKSUM_FUNCTIONS ? \ argument 4 zio_checksum_table[(idx)].ci_name : "UNKNOWN") 5 #define ZDB_OT_TYPE(idx) ((idx) < DMU_OT_NUMTYPES ? (idx) : \ argument 6 (idx) == DMU_OTN_ZAP_DATA || (idx) == DMU_OTN_ZAP_METADATA ? \ 8 (idx) == DMU_OTN_UINT64_DATA || (idx) == DMU_OTN_UINT64_METADATA ? \
|
| /freebsd/share/examples/libusb20/ |
| H A D | control.c | 227 int idx; in parse_req() local 230 for (idx = 0; argc != 0 && idx <= 6; argc--, idx++) in parse_req() 231 switch (idx) in parse_req() 235 if (*argv[idx] == 'i') in parse_req() 237 else if (*argv[idx] == 'o') in parse_req() 242 argv[idx]); in parse_req() 249 if (*argv[idx] == 's') in parse_req() 251 else if (*argv[idx] == 'c') in parse_req() 253 else if (*argv[idx] == 'v') in parse_req() 259 argv[idx]); in parse_req() [all …]
|