/freebsd/tests/sys/kern/ |
H A D | subr_physmem_test.c | 38 vm_paddr_t avail[4]; in ATF_TC_BODY() local 43 len = physmem_avail(avail, 4); in ATF_TC_BODY() 45 ATF_CHECK_EQ(avail[0], 2 * PAGE_SIZE); in ATF_TC_BODY() 46 ATF_CHECK_EQ(avail[1], 3 * PAGE_SIZE); in ATF_TC_BODY() 50 len = physmem_avail(avail, 4); in ATF_TC_BODY() 52 ATF_CHECK_EQ(avail[0], 2 * PAGE_SIZE); in ATF_TC_BODY() 53 ATF_CHECK_EQ(avail[1], 4 * PAGE_SIZE); in ATF_TC_BODY() 57 len = physmem_avail(avail, 4); in ATF_TC_BODY() 59 ATF_CHECK_EQ(avail[0], 2 * PAGE_SIZE); in ATF_TC_BODY() 60 ATF_CHECK_EQ(avail[1], 5 * PAGE_SIZE); in ATF_TC_BODY() [all …]
|
/freebsd/contrib/lib9p/pytest/ |
H A D | numalloc.py | 130 self.avail = [[min_val, max_val]] 132 self.avail = [] 173 high = len(self.avail) - 1 176 pair = self.avail[mid] 218 nblocks = len(self.avail) 224 pair = self.avail[i] 238 del self.avail[i] 248 self.avail.insert(i + 1, newpair) 319 if highval > val and i < len(self.avail): 320 if self.avail[i][0] <= highval: [all …]
|
/freebsd/contrib/libarchive/libarchive/test/ |
H A D | test_archive_read.c | 37 ssize_t avail; in DEFINE_TEST() local 47 assert(NULL != __archive_read_ahead(ar, sizeof(buf) - 1, &avail)); in DEFINE_TEST() 48 assertEqualInt(sizeof(buf), avail); in DEFINE_TEST() 51 assert(NULL == __archive_read_ahead(ar, sizeof(buf) + 1, &avail)); in DEFINE_TEST() 52 assertEqualInt(sizeof(buf), avail); in DEFINE_TEST() 55 assert(NULL == __archive_read_ahead(ar, sizeof(buf) + 1, &avail)); in DEFINE_TEST() 56 assertEqualInt(sizeof(buf), avail); in DEFINE_TEST() 59 assert(NULL != __archive_read_ahead(ar, sizeof(buf), &avail)); in DEFINE_TEST() 60 assertEqualInt(sizeof(buf), avail); in DEFINE_TEST()
|
/freebsd/contrib/libarchive/libarchive/ |
H A D | archive_read_support_filter_uu.c | 178 get_line(const unsigned char *b, ssize_t avail, ssize_t *nlsize) in get_line() argument 183 while (len < avail) { in get_line() 190 if (avail-len > 1 && b[1] == '\n') { in get_line() 208 return (avail); in get_line() 213 const unsigned char **b, ssize_t *avail, ssize_t *ravail, in bid_get_line() argument 220 if (*avail == 0) { in bid_get_line() 224 len = get_line(*b, *avail, nl); in bid_get_line() 229 while (*nl == 0 && len == *avail && !quit && in bid_get_line() 231 ssize_t diff = *ravail - *avail; in bid_get_line() 240 *b = __archive_read_filter_ahead(filter, nbytes_req, avail); in bid_get_line() [all …]
|
H A D | archive_read_support_filter_gzip.c | 138 ssize_t avail, len; in peek_at_header() local 148 p = __archive_read_filter_ahead(filter, len, &avail); in peek_at_header() 149 if (p == NULL || avail == 0) in peek_at_header() 171 p = __archive_read_filter_ahead(filter, len + 2, &avail); in peek_at_header() 185 if (avail < len) { in peek_at_header() 186 if (avail > MAX_FILENAME_LENGTH) { in peek_at_header() 190 len, &avail); in peek_at_header() 209 if (avail < len) { in peek_at_header() 210 if (avail > MAX_COMMENT_LENGTH) { in peek_at_header() 214 len, &avail); in peek_at_header() [all …]
|
H A D | archive_read_support_format_raw.c | 132 ssize_t avail; in archive_read_format_raw_read_data() local 146 *buff = __archive_read_ahead(a, 1, &avail); in archive_read_format_raw_read_data() 147 if (avail > 0) { in archive_read_format_raw_read_data() 149 *size = avail; in archive_read_format_raw_read_data() 152 info->unconsumed = avail; in archive_read_format_raw_read_data() 154 } else if (0 == avail) { in archive_read_format_raw_read_data() 164 return ((int)avail); in archive_read_format_raw_read_data()
|
H A D | archive_read.c | 553 ssize_t avail; in choose_filters() local 576 __archive_read_filter_ahead(a->filter, 1, &avail); in choose_filters() 577 if (avail < 0) { in choose_filters() 1319 __archive_read_ahead(struct archive_read *a, size_t min, ssize_t *avail) in __archive_read_ahead() argument 1321 return (__archive_read_filter_ahead(a->filter, min, avail)); in __archive_read_ahead() 1326 size_t min, ssize_t *avail) in __archive_read_filter_ahead() argument 1332 if (avail) in __archive_read_filter_ahead() 1333 *avail = ARCHIVE_FATAL; in __archive_read_filter_ahead() 1348 if (filter->avail >= min && filter->avail > 0) { in __archive_read_filter_ahead() 1349 if (avail != NULL) in __archive_read_filter_ahead() [all …]
|
H A D | archive_read_support_format_cab.c | 552 cab_read_ahead_remaining(struct archive_read *a, size_t min, ssize_t *avail) in cab_read_ahead_remaining() argument 557 p = __archive_read_ahead(a, min, avail); in cab_read_ahead_remaining() 791 ssize_t avail; in cab_read_header() local 803 if ((p = cab_read_ahead_remaining(a, 256, &avail)) == NULL) in cab_read_header() 805 if ((len = cab_strnlen(p, avail-1)) <= 0) in cab_read_header() 1338 cab_read_ahead_cfdata(struct archive_read *a, ssize_t *avail) in cab_read_ahead_cfdata() argument 1345 *avail = err; in cab_read_ahead_cfdata() 1351 return (cab_read_ahead_cfdata_none(a, avail)); in cab_read_ahead_cfdata() 1353 return (cab_read_ahead_cfdata_deflate(a, avail)); in cab_read_ahead_cfdata() 1355 return (cab_read_ahead_cfdata_lzx(a, avail)); in cab_read_ahead_cfdata() [all …]
|
/freebsd/sys/powerpc/ofw/ |
H A D | ofw_machdep.c | 285 excise_reserved_regions(struct mem_region *avail, int asz, in excise_reserved_regions() argument 296 if (exclude[j].mr_start <= avail[i].mr_start && in excise_reserved_regions() 298 avail[i].mr_start + avail[i].mr_size) { in excise_reserved_regions() 300 avail[k-1] = avail[k]; in excise_reserved_regions() 312 if (exclude[j].mr_start >= avail[i].mr_start && in excise_reserved_regions() 313 exclude[j].mr_start < avail[i].mr_start + in excise_reserved_regions() 314 avail[i].mr_size) { in excise_reserved_regions() 316 avail[ in excise_reserved_regions() 351 excise_initrd_region(struct mem_region * avail,int asz) excise_initrd_region() argument 400 excise_msi_region(struct mem_region * avail,int asz) excise_msi_region() argument 427 excise_fdt_reserved(struct mem_region * avail,int asz) excise_fdt_reserved() argument [all...] |
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/refreserv/ |
H A D | refreserv_004_pos.ksh | 74 typeset -i avail 75 avail=$(get_prop avail $subfs) 76 log_must zfs set refreservation=$avail $subfs 79 log_must mkfile $avail $mntpnt/$TESTFILE 82 ((exceed = avail + 1)) 84 log_mustnot mkfile $avail $mntpnt/$TESTFILE
|
/freebsd/sbin/conscontrol/ |
H A D | conscontrol.c | 61 char *buf, *p, *avail; in consstatus() local 72 if ((avail = strchr(buf, '/')) == NULL) in consstatus() 74 p = avail; in consstatus() 75 *avail++ = '\0'; in consstatus() 78 p = avail + strlen(avail); in consstatus() 79 if (p != avail) in consstatus() 82 printf(" Available: %s\n", avail); in consstatus()
|
/freebsd/sys/contrib/openzfs/lib/libshare/os/linux/ |
H A D | nfs.c | 561 static int avail; in nfs_available() local 563 if (!avail) { in nfs_available() 565 avail = -1; in nfs_available() 567 avail = 1; in nfs_available() 570 return (avail == 1); in nfs_available() 576 static int avail; in exports_available() local 578 if (!avail) { in exports_available() 580 avail = -1; in exports_available() 582 avail = 1; in exports_available() 585 return (avail == 1); in exports_available()
|
/freebsd/sys/kern/ |
H A D | subr_physmem.c | 184 regions_to_avail(vm_paddr_t *avail, uint32_t exflags, size_t maxavail, in regions_to_avail() argument 193 bzero(avail, maxavail * sizeof(vm_paddr_t)); in regions_to_avail() 252 avail[acnt - 1] == (vm_paddr_t)start) { in regions_to_avail() 253 avail[acnt - 1] = (vm_paddr_t)xstart; in regions_to_avail() 255 avail[acnt++] = (vm_paddr_t)start; in regions_to_avail() 256 avail[acnt++] = (vm_paddr_t)xstart; in regions_to_avail() 285 if (acnt > 0 && avail[acnt - 1] == (vm_paddr_t)start) { in regions_to_avail() 286 avail[acnt - 1] = (vm_paddr_t)end; in regions_to_avail() 288 avail[acnt++] = (vm_paddr_t)start; in regions_to_avail() 289 avail[acnt++] = (vm_paddr_t)end; in regions_to_avail() [all …]
|
/freebsd/contrib/jemalloc/src/ |
H A D | tcache.c | 121 rtree_ctx, (uintptr_t)*(tbin->avail - 1 - i), true, in tbin_extents_lookup_size_check() 153 *(tbin->avail - 1 - i)); in tcache_bin_flush_small() 183 void *ptr = *(tbin->avail - 1 - i); in tcache_bin_flush_small() 198 *(tbin->avail - 1 - ndeferred) = ptr; in tcache_bin_flush_small() 221 memmove(tbin->avail - rem, tbin->avail - tbin->ncached, rem * in tcache_bin_flush_small() 245 item_extent[i] = iealloc(tsd_tsdn(tsd), *(tbin->avail - 1 - i)); in tcache_bin_flush_large() 268 void *ptr = *(tbin->avail - 1 - i); in tcache_bin_flush_large() 297 void *ptr = *(tbin->avail - 1 - i); in tcache_bin_flush_large() 310 *(tbin->avail - 1 - ndeferred) = ptr; in tcache_bin_flush_large() 332 memmove(tbin->avail - rem, tbin->avail - tbin->ncached, rem * in tcache_bin_flush_large() [all …]
|
/freebsd/sbin/ipf/libipf/ |
H A D | load_http.c | 35 size_t avail; in load_http() local 51 avail = sizeof(buffer); in load_http() 52 error = snprintf(buffer, avail, "GET %s HTTP/1.0\r\n", url); in load_http() 58 avail -= error; in load_http() 86 error = snprintf(buffer + strlen(buffer), avail, "Host: %s\r\n\r\n", s); in load_http() 87 if (error >= avail) { in load_http()
|
/freebsd/lib/libpmc/ |
H A D | pmclog.c | 106 int avail, copylen, recordsize, used; in pmclog_get_record() local 111 if ((avail = *len) <= 0) in pmclog_get_record() 138 copylen = avail < HEADERSIZE ? avail : HEADERSIZE; in pmclog_get_record() 156 if (recordsize <= avail) { /* full record available */ in pmclog_get_record() 163 bcopy(src, dst, avail - copylen); in pmclog_get_record() 164 ps->ps_svcount = used = avail; in pmclog_get_record() 185 if (avail + ps->ps_svcount < HEADERSIZE) { in pmclog_get_record() 186 bcopy(src, dst, avail); in pmclog_get_record() 187 ps->ps_svcount += avail; in pmclog_get_record() 188 used = avail; in pmclog_get_record() [all …]
|
/freebsd/sys/dev/mlx5/mlx5_core/ |
H A D | mlx5_uar.c | 208 unsigned int *avail; in alloc_bfreg() local 234 avail = &up->fp_avail; in alloc_bfreg() 237 avail = &up->reg_avail; in alloc_bfreg() 241 (*avail)--; in alloc_bfreg() 242 if (!(*avail)) in alloc_bfreg() 293 unsigned int *avail; in mlx5_free_bfreg() local 309 avail = &up->fp_avail; in mlx5_free_bfreg() 312 avail = &up->reg_avail; in mlx5_free_bfreg() 316 (*avail)++; in mlx5_free_bfreg() 318 if (*avail == 1) in mlx5_free_bfreg()
|
/freebsd/tests/sys/cddl/zfs/tests/refreserv/ |
H A D | refreserv_004_pos.ksh | 82 typeset avail 83 avail=5M 84 log_must $ZFS set refreservation=$avail $subfs 87 log_must $MKFILE $avail $mntpnt/$TESTFILE
|
/freebsd/sys/netinet/ |
H A D | accf_tls.c | 74 int avail; in so_hastls() local 90 avail = sbavail(sb); in so_hastls() 91 if (avail < 5) in so_hastls() 102 if (reclen <= 16384 && avail < (int) 5 + reclen) in so_hastls()
|
/freebsd/sys/x86/x86/ |
H A D | dbreg.c | 136 int avail, i, wsize; in dbreg_set_watchpoint() local 157 avail = 0; in dbreg_set_watchpoint() 160 avail++; in dbreg_set_watchpoint() 163 if (avail * MAXWATCHSIZE < size) in dbreg_set_watchpoint() 168 if ((size >= 8 || (avail == 1 && size > 4)) && in dbreg_set_watchpoint() 178 avail--; in dbreg_set_watchpoint()
|
/freebsd/sys/dev/virtio/ |
H A D | virtio_ring.h | 89 struct vring_avail *avail; member 130 #define vring_used_event(vr) ((vr)->avail->ring[(vr)->num]) 153 vr->avail = (struct vring_avail *) (p + in vring_init() 156 (((unsigned long) &vr->avail->ring[num] + align-1) & ~(align-1)); in vring_init()
|
/freebsd/contrib/llvm-project/clang/include/clang/Basic/ |
H A D | OpenCLExtensions.def | 19 // define OPENCL_GENERIC_EXTENSION(ext, pragma, avail, core, opt) where 25 // avail - minimum OpenCL version supporting it. 57 #define OPENCL_EXTENSION(ext, pragma, avail) OPENCL_GENERIC_EXTENSION(ext, pragma, avail, 0U, 0U) 58 #define OPENCL_COREFEATURE(ext, pragma, avail, core) OPENCL_GENERIC_EXTENSION(ext, pragma, avail, … 59 #define OPENCL_OPTIONALCOREFEATURE(ext, pragma, avail, opt) OPENCL_GENERIC_EXTENSION(ext, pragma, a…
|
/freebsd/sys/powerpc/pseries/ |
H A D | platform_chrp.c | 70 struct mem_region *avail, int *availsz); 143 struct mem_region *phys, *avail; in chrp_attach() local 147 mem_regions(&phys, &nphys, &avail, &navail); in chrp_attach() 286 struct mem_region *avail, int *availsz) in chrp_mem_regions() argument 291 ofw_mem_regions(phys, physsz, avail, availsz); in chrp_mem_regions() 292 parse_drconf_memory(phys, physsz, avail, availsz); in chrp_mem_regions() 306 if (avail[i].mr_start + avail[i].mr_size > maxphysaddr) in chrp_mem_regions() 307 avail[i].mr_size = maxphysaddr - avail[i].mr_start; in chrp_mem_regions()
|
/freebsd/sys/powerpc/powermac/ |
H A D | platform_powermac.c | 66 struct mem_region *avail, int *availsz); 131 struct mem_region *avail, int *availsz) in powermac_mem_regions() argument 171 avail[i].mr_start = phys[i].mr_start; in powermac_mem_regions() 172 avail[i].mr_size = phys[i].mr_size; in powermac_mem_regions() 179 avail[j].mr_start = memoryprop[i]; in powermac_mem_regions() 180 avail[j].mr_size = memoryprop[i + 1]; in powermac_mem_regions() 187 avail[j].mr_start = phys[i].mr_start; in powermac_mem_regions() 188 avail[j].mr_size = phys[i].mr_size; in powermac_mem_regions()
|
/freebsd/sys/dev/bhnd/ |
H A D | bhnd.c | 576 uint32_t avail; in bhnd_generic_request_clock() local 588 avail = 0x0; in bhnd_generic_request_clock() 599 avail |= BHND_CCS_ALPAVAIL; in bhnd_generic_request_clock() 603 avail |= BHND_CCS_HTAVAIL; in bhnd_generic_request_clock() 617 error = bhnd_core_clkctl_wait(clkctl, avail, avail); in bhnd_generic_request_clock() 631 uint32_t avail; in bhnd_generic_enable_clocks() local 643 avail = 0x0; in bhnd_generic_enable_clocks() 655 avail |= BHND_CCS_ALPAVAIL; in bhnd_generic_enable_clocks() 661 avail |= BHND_CCS_HTAVAIL; in bhnd_generic_enable_clocks() 678 error = bhnd_core_clkctl_wait(clkctl, avail, avail); in bhnd_generic_enable_clocks() [all …]
|