/freebsd/lib/libc/xdr/ |
H A D | xdr_float.c | 98 struct sgl_limits *lim; in xdr_float() local 108 for (i = 0, lim = sgl_limits; i < nitems(sgl_limits); in xdr_float() 109 i++, lim++) { in xdr_float() 110 if ((vs.mantissa2 == lim->s.mantissa2) && in xdr_float() 111 (vs.exp == lim->s.exp) && in xdr_float() 112 (vs.mantissa1 == lim->s.mantissa1)) { in xdr_float() 113 is = lim->ieee; in xdr_float() 131 for (i = 0, lim = sgl_limits; i < nitems(sgl_limits); in xdr_float() 132 i++, lim++) { in xdr_float() 133 if ((is.exp == lim->ieee.exp) && in xdr_float() [all …]
|
/freebsd/lib/libc/net/ |
H A D | ip6opt.c | 43 static int ip6optlen(u_int8_t *opt, u_int8_t *lim); 242 u_int8_t *lim; in inet6_option_next() local 262 lim = (u_int8_t *)ip6e + hdrlen; in inet6_option_next() 266 if ((optlen = ip6optlen(*tptrp, lim)) == 0) in inet6_option_next() 271 if (*tptrp >= lim) { /* there is no option */ in inet6_option_next() 279 if (ip6optlen(*tptrp, lim) == 0) in inet6_option_next() 298 u_int8_t *optp, *lim; in inet6_option_find() local 318 lim = (u_int8_t *)ip6e + hdrlen; in inet6_option_find() 322 if ((optlen = ip6optlen(*tptrp, lim)) == 0) in inet6_option_find() 327 for (optp = *tptrp; optp < lim; optp += optlen) { in inet6_option_find() [all …]
|
/freebsd/sys/libkern/ |
H A D | bsearch.c | 56 size_t lim; in bsearch() local 60 for (lim = nmemb; lim != 0; lim >>= 1) { in bsearch() 61 p = base + (lim >> 1) * size; in bsearch() 67 lim--; in bsearch()
|
/freebsd/lib/libc/locale/ |
H A D | toupper.c | 49 size_t lim; in ___toupper_l() local 59 for (lim = rr->__nranges; lim != 0; lim >>= 1) { in ___toupper_l() 60 re = base + (lim >> 1); in ___toupper_l() 67 lim--; in ___toupper_l()
|
H A D | tolower.c | 49 size_t lim; in ___tolower_l() local 59 for (lim = rr->__nranges; lim != 0; lim >>= 1) { in ___tolower_l() 60 re = base + (lim >> 1); in ___tolower_l() 65 lim--; in ___tolower_l()
|
H A D | runetype.c | 49 size_t lim; in ___runetype_l() local 59 for (lim = rr->__nranges; lim != 0; lim >>= 1) { in ___runetype_l() 60 re = base + (lim >> 1); in ___runetype_l() 68 lim--; in ___runetype_l()
|
H A D | nextwctype.c | 42 size_t lim; in nextwctype_l() local 66 for (lim = rr->__nranges; lim != 0; lim >>= 1) { in nextwctype_l() 67 re = base + (lim >> 1); in nextwctype_l() 72 lim--; in nextwctype_l()
|
/freebsd/lib/libc/stdlib/ |
H A D | bsearch.c | 70 size_t lim; in bsearch_b() local 74 for (lim = nmemb; lim != 0; lim >>= 1) { in bsearch_b() 75 p = base + (lim >> 1) * size; in bsearch_b() 81 lim--; in bsearch_b()
|
/freebsd/contrib/bearssl/src/x509/ |
H A D | asn1.t0 | 43 \ -- A word called "skip-remaining-inner" ( lim -- lim ) which reads but 167 : read8 ( lim -- lim x ) 172 : read16be ( lim -- lim x ) 176 : read16le ( lim -- lim x ) 181 : read-blob ( lim addr -- ) 188 : skip-remaining ( lim -- lim ) 191 : skip-remaining-inner ( lim -- lim ) 232 : read-tag ( lim -- lim constructed value ) 253 : read-tag-or-end ( lim -- lim constructed value ) 259 : iftag-skip ( lim constructed value ref -- lim constructed value ) [all …]
|
/freebsd/usr.sbin/rtsold/ |
H A D | rtsock.c | 97 char *lim, *next; in rtsock_input() local 107 lim = msg + n; in rtsock_input() 108 for (next = msg; next < lim; next += len) { in rtsock_input() 110 if (lim - next < lenlim) in rtsock_input() 131 ret = (*rtsock_dispatch[idx].func)(s, rtm, lim); in rtsock_input() 140 rtsock_input_ifannounce(int s __unused, struct rt_msghdr *rtm, char *lim) in rtsock_input_ifannounce() argument 146 if ((char *)(ifan + 1) > lim) in rtsock_input_ifannounce()
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/channel_program/lua_core/ |
H A D | tst.timeout.ksh | 35 typeset lim=$1 37 log_mustnot eval 'error=$(zfs program -t '$lim' $TESTPOOL $ZCP_ROOT/lua_core/tst.timeout.zcp 2>&1)' 40 log_must [ $instrs_run -ge $(( $lim - 100 )) ] 41 log_must [ $instrs_run -le $(( $lim + 100 )) ] 42 log_note "With limit $lim the program ended after $instrs_run instructions"
|
H A D | tst.lib_table.lua | 62 a = {}; lim = 2000 63 for i=1, lim do a[i]=i end 64 assert(select(lim, unpack(a)) == lim and select('#', unpack(a)) == lim) 68 assert(#x == lim and x[1] == 1 and x[lim] == lim) 69 x = {unpack(a, lim-2)} 70 assert(#x == 3 and x[1] == lim-2 and x[3] == lim)
|
/freebsd/sys/fs/fdescfs/ |
H A D | fdesc_vfsops.c | 186 int lim; in fdesc_statfs() local 200 lim = lim_cur(td, RLIMIT_NOFILE); in fdesc_statfs() 204 if (lim > limit) in fdesc_statfs() 205 lim = limit; in fdesc_statfs() 206 last = min(fdp->fd_nfiles, lim); in fdesc_statfs() 216 if (fdp->fd_nfiles < lim) in fdesc_statfs() 217 freefd += (lim - fdp->fd_nfiles); in fdesc_statfs() 226 sbp->f_files = lim + 1; /* Allow for "." */ in fdesc_statfs()
|
/freebsd/sys/dev/netmap/ |
H A D | if_re_netmap.h | 77 u_int const lim = kring->nkr_num_slots - 1; in re_netmap_txsync() local 109 if (nic_i == lim) /* mark end of ring */ in re_netmap_txsync() 129 nm_i = nm_next(nm_i, lim); in re_netmap_txsync() 130 nic_i = nm_next(nic_i, lim); in re_netmap_txsync() 159 kring->nr_hwtail = nm_prev(netmap_idx_n2k(kring, nic_i), lim); in re_netmap_txsync() 178 u_int const lim = kring->nkr_num_slots - 1; in re_netmap_rxsync() local 186 if (head > lim) in re_netmap_rxsync() 202 uint32_t stop_i = nm_prev(kring->nr_hwcur, lim); in re_netmap_rxsync() 223 nm_i = nm_next(nm_i, lim); in re_netmap_rxsync() 224 nic_i = nm_next(nic_i, lim); in re_netmap_rxsync() [all …]
|
H A D | netmap_generic.c | 518 u_int const lim = kring->nkr_num_slots - 1; in generic_netmap_tx_clean() local 519 u_int nm_i = nm_next(kring->nr_hwtail, lim); in generic_netmap_tx_clean() 568 nm_i = nm_next(nm_i, lim); in generic_netmap_tx_clean() 570 kring->nr_hwtail = nm_prev(nm_i, lim); in generic_netmap_tx_clean() 578 ring_middle(u_int inf, u_int sup, u_int lim) in ring_middle() argument 580 u_int n = lim + 1; in ring_middle() 615 u_int lim = kring->nkr_num_slots - 1; in generic_set_tx_event() local 618 u_int ntc = nm_next(kring->nr_hwtail, lim); /* next to clean */ in generic_set_tx_event() 635 e = ring_middle(ntc, hwcur, lim); in generic_set_tx_event() 700 u_int const lim = kring->nkr_num_slots - 1; in generic_netmap_txsync() local [all …]
|
H A D | if_vtnet_netmap.h | 65 u_int const lim = kring->nkr_num_slots - 1; in vtnet_netmap_txsync() local 83 for (; nm_i != head; nm_i = nm_next(nm_i, lim)) { in vtnet_netmap_txsync() 135 if (kring->nr_hwtail > lim) in vtnet_netmap_txsync() 136 kring->nr_hwtail -= lim + 1; in vtnet_netmap_txsync() 159 u_int const lim = kring->nkr_num_slots - 1; in vtnet_netmap_kring_refill() local 172 nm_i = nm_next(nm_i, lim), num--) { in vtnet_netmap_kring_refill() 251 u_int const lim = kring->nkr_num_slots - 1; in vtnet_netmap_rxsync() local 272 uint32_t hwtail_lim = nm_prev(kring->nr_hwcur, lim); in vtnet_netmap_rxsync() 312 nm_i = nm_next(nm_i, lim); in vtnet_netmap_rxsync()
|
/freebsd/contrib/lua/src/ |
H A D | lmathlib.c | 537 lua_Unsigned lim = n; in project() local 539 lim |= (lim >> 1); in project() 540 lim |= (lim >> 2); in project() 541 lim |= (lim >> 4); in project() 542 lim |= (lim >> 8); in project() 543 lim |= (lim >> 16); in project() 545 lim |= (lim >> 32); /* integer type has more than 32 bits */ in project() 547 lua_assert((lim & (lim + 1)) == 0 /* 'lim + 1' is a power of 2, */ in project() 548 && lim >= n /* not smaller than 'n', */ in project() 549 && (lim >> 1) < n); /* and it is the smallest one */ in project() [all …]
|
/freebsd/usr.sbin/rtadvd/ |
H A D | if.c | 164 get_next_msg(char *buf, char *lim, int ifindex, size_t *lenp, int filter) in get_next_msg() argument 172 rtm < (struct rt_msghdr *)lim; in get_next_msg() 177 "(buf=%p lim=%p rtm=%p)", __func__, in get_next_msg() 178 buf, lim, rtm); in get_next_msg() 184 "(buf=%p lim=%p rtm=%p)", __func__, in get_next_msg() 185 buf, lim, rtm); in get_next_msg() 286 char *p, *lim; in get_prefixlen() local 293 lim = (char *)sa + sa->sa_len; in get_prefixlen() 294 return prefixlen(p, lim); in get_prefixlen() 298 prefixlen(unsigned char *p, unsigned char *lim) in prefixlen() argument 419 char *lim; update_ifinfo() local 617 get_next_msghdr(struct if_msghdr * ifm,struct if_msghdr * lim) get_next_msghdr() argument [all...] |
/freebsd/lib/libc/string/ |
H A D | memset_s.c | 37 rsize_t lim; in memset_s() local 42 lim = n < smax ? n : smax; in memset_s() 53 while (lim > 0) in memset_s() 54 dst[--lim] = v; in memset_s()
|
/freebsd/lib/libc/db/btree/ |
H A D | bt_search.c | 63 indx_t base, idx, lim; in __bt_search() local 74 for (base = 0, lim = NEXTINDEX(h); lim; lim >>= 1) { in __bt_search() 75 t->bt_cur.index = idx = base + (lim >> 1); in __bt_search() 85 --lim; in __bt_search()
|
/freebsd/contrib/ntp/libntp/ |
H A D | ntp_calgps.c | 207 int32_t lim = pivot->secs + shift; in _gpsntp_from_daytime() local 208 retv.days -= (retv.secs > lim || in _gpsntp_from_daytime() 209 (retv.secs == lim && retv.frac >= pivot->frac)); in _gpsntp_from_daytime() 211 int32_t lim = pivot->secs - shift; in _gpsntp_from_daytime() local 212 retv.days += (retv.secs < lim || in _gpsntp_from_daytime() 213 (retv.secs == lim && retv.frac < pivot->frac)); in _gpsntp_from_daytime() 540 int32_t lim = pivot->wsecs + shift; in _gpscal_from_weektime() local 541 retv.weeks -= (retv.wsecs > lim || in _gpscal_from_weektime() 542 (retv.wsecs == lim && retv.frac >= pivot->frac)); in _gpscal_from_weektime() 544 int32_t lim = pivot->wsecs - shift; in _gpscal_from_weektime() local [all …]
|
/freebsd/sys/amd64/vmm/intel/ |
H A D | vmcs.c | 132 vmcs_seg_desc_encoding(int seg, uint32_t *base, uint32_t *lim, uint32_t *acc) in vmcs_seg_desc_encoding() argument 138 *lim = VMCS_GUEST_ES_LIMIT; in vmcs_seg_desc_encoding() 143 *lim = VMCS_GUEST_CS_LIMIT; in vmcs_seg_desc_encoding() 148 *lim = VMCS_GUEST_SS_LIMIT; in vmcs_seg_desc_encoding() 153 *lim = VMCS_GUEST_DS_LIMIT; in vmcs_seg_desc_encoding() 158 *lim = VMCS_GUEST_FS_LIMIT; in vmcs_seg_desc_encoding() 163 *lim = VMCS_GUEST_GS_LIMIT; in vmcs_seg_desc_encoding() 168 *lim = VMCS_GUEST_TR_LIMIT; in vmcs_seg_desc_encoding() 173 *lim = VMCS_GUEST_LDTR_LIMIT; in vmcs_seg_desc_encoding() 178 *lim = VMCS_GUEST_IDTR_LIMIT; in vmcs_seg_desc_encoding() [all …]
|
/freebsd/sys/dev/ena/ |
H A D | ena_netmap.c | 50 uint16_t lim; member 113 int nm_i, qid, head, lim, rc; in ena_netmap_alloc_rx_slot() local 162 lim = kring->nkr_num_slots - 1; in ena_netmap_alloc_rx_slot() 163 kring->nr_hwcur = nm_next(nm_i, lim); in ena_netmap_alloc_rx_slot() 175 int nm_i, qid, lim; in ena_netmap_free_rx_slot() local 196 lim = kring->nkr_num_slots - 1; in ena_netmap_free_rx_slot() 197 nm_i = nm_prev(kring->nr_hwcur, lim); in ena_netmap_free_rx_slot() 475 nm = nm_next(nm, ctx->lim); in ena_netmap_count_slots() 576 *packet_len = ena_netmap_packet_len(ctx->slots, ctx->nm_i, ctx->lim); in ena_netmap_tx_map_slots() 580 __builtin_prefetch(&ctx->slots[nm_next(ctx->nm_i, ctx->lim)]); in ena_netmap_tx_map_slots() [all …]
|
/freebsd/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_msgget.c | 202 int i, lim = 0; in ATF_TC_BODY() local 205 if (sysctlbyname("kern.ipc.msgmni", &lim, &len, NULL, 0) != 0) in ATF_TC_BODY() 208 buf = calloc(lim + 1, sizeof(*buf)); in ATF_TC_BODY() 211 for (i = 0; i < lim; i++) { in ATF_TC_BODY() 234 for (i = 0; i < lim; i++) in ATF_TC_BODY() 240 atf_tc_fail("msgget(2) opened more than %d queues", lim); in ATF_TC_BODY()
|
H A D | t_setrlimit.c | 84 int *buf, lim; in ATF_TC_BODY() local 92 for (i = lim = 0; i < __arraycount(rlimit); i++) { in ATF_TC_BODY() 109 lim = rlimit[i]; in ATF_TC_BODY() 130 if (lim != 0) in ATF_TC_BODY() 131 atf_tc_fail("failed to set limit (%d)", lim); in ATF_TC_BODY() 378 static const rlim_t lim = 12; in ATF_TC_BODY() local 387 res.rlim_cur = lim; in ATF_TC_BODY() 388 res.rlim_max = lim; in ATF_TC_BODY() 403 for (i = 0; i < (int)lim; i++) { in ATF_TC_BODY()
|