/illumos-gate/usr/src/lib/libumem/common/ |
H A D | umem_fork.c | 64 umem_lockup_log_header(umem_log_header_t *lhp) in umem_lockup_log_header() argument 67 if (lhp == NULL) in umem_lockup_log_header() 70 (void) mutex_lock(&lhp->lh_cpu[idx].clh_lock); in umem_lockup_log_header() 72 (void) mutex_lock(&lhp->lh_lock); in umem_lockup_log_header() 76 umem_release_log_header(umem_log_header_t *lhp) in umem_release_log_header() argument 79 if (lhp == NULL) in umem_release_log_header() 82 (void) mutex_unlock(&lhp->lh_lock); in umem_release_log_header() 85 (void) mutex_unlock(&lhp->lh_cpu[idx].clh_lock); in umem_release_log_header()
|
H A D | umem.c | 1273 umem_log_header_t *lhp; in umem_log_init() local 1286 lhp = vmem_xalloc(umem_log_arena, lhsize, 64, P2NPHASE(lhsize, 64), 0, in umem_log_init() 1288 if (lhp == NULL) in umem_log_init() 1291 bzero(lhp, lhsize); in umem_log_init() 1293 (void) mutex_init(&lhp->lh_lock, USYNC_THREAD, NULL); in umem_log_init() 1294 lhp->lh_nchunks = nchunks; in umem_log_init() 1295 lhp->lh_chunksize = P2ROUNDUP(logsize / nchunks, PAGESIZE); in umem_log_init() 1296 if (lhp->lh_chunksize == 0) in umem_log_init() 1297 lhp->lh_chunksize = PAGESIZE; in umem_log_init() 1299 lhp->lh_base = vmem_alloc(umem_log_arena, in umem_log_init() [all …]
|
/illumos-gate/usr/src/uts/common/os/ |
H A D | driver_lyr.c | 357 struct ldi_handle *lhp, **lhpp, *retlhp; in handle_alloc() local 363 lhp = kmem_zalloc(sizeof (*lhp), KM_SLEEP); in handle_alloc() 382 kmem_free(lhp, sizeof (struct ldi_handle)); in handle_alloc() 387 lhp->lh_ref = 1; in handle_alloc() 388 lhp->lh_vp = vp; in handle_alloc() 389 lhp->lh_ident = ident; in handle_alloc() 391 mutex_init(lhp->lh_lock, NULL, MUTEX_DEFAULT, NULL); in handle_alloc() 395 lhp->lh_type = 0; in handle_alloc() 398 lhp->lh_type |= LH_STREAM; in handle_alloc() 400 lhp->lh_type |= LH_CBDEV; in handle_alloc() [all …]
|
H A D | kmem.c | 1399 kmem_log_header_t *lhp; in kmem_log_init() local 1409 lhp = vmem_xalloc(kmem_log_arena, lhsize, 64, P2NPHASE(lhsize, 64), 0, in kmem_log_init() 1411 bzero(lhp, lhsize); in kmem_log_init() 1413 mutex_init(&lhp->lh_lock, NULL, MUTEX_DEFAULT, NULL); in kmem_log_init() 1414 lhp->lh_nchunks = nchunks; in kmem_log_init() 1415 lhp->lh_chunksize = P2ROUNDUP(logsize / nchunks + 1, PAGESIZE); in kmem_log_init() 1416 lhp->lh_base = vmem_alloc(kmem_log_arena, in kmem_log_init() 1417 lhp->lh_chunksize * nchunks, VM_SLEEP); in kmem_log_init() 1418 lhp->lh_free = vmem_alloc(kmem_log_arena, in kmem_log_init() 1420 bzero(lhp->lh_base, lhp->lh_chunksize * nchunks); in kmem_log_init() [all …]
|
/illumos-gate/usr/src/cmd/mdb/common/modules/genunix/ |
H A D | ldi.c | 50 struct ldi_handle *lhp; /* ldi handle pointer */ member 90 if ((mdb_vread(&lhwp->lhp, sizeof (struct ldi_handle *), in ldi_handle_walk_init() 96 wsp->walk_addr = (uintptr_t)lhwp->lhp; in ldi_handle_walk_init() 116 if ((mdb_vread(&lhwp->lhp, sizeof (struct ldi_handle *), in ldi_handle_walk_step() 123 wsp->walk_addr = (uintptr_t)lhwp->lhp; in ldi_handle_walk_step()
|
H A D | kmem.c | 1799 kmem_log_header_t *lhp; in kmem_log_walk_init() local 1817 lhp = &klw->klw_lh; in kmem_log_walk_init() 1819 if (mdb_vread(lhp, sizeof (kmem_log_header_t), lp) == -1) { in kmem_log_walk_init() 1825 klw->klw_size = lhp->lh_chunksize * lhp->lh_nchunks; in kmem_log_walk_init() 1827 maxndx = lhp->lh_chunksize / sizeof (kmem_bufctl_audit_t) - 1; in kmem_log_walk_init() 1830 (uintptr_t)lhp->lh_base) == -1) { in kmem_log_walk_init() 1831 mdb_warn("failed to read log at base %p", lhp->lh_base); in kmem_log_walk_init() 1837 klw->klw_sorted = mdb_alloc(maxndx * lhp->lh_nchunks * in kmem_log_walk_init() 1840 for (i = 0, k = 0; i < lhp->lh_nchunks; i++) { in kmem_log_walk_init() 1842 ((uintptr_t)klw->klw_base + i * lhp->lh_chunksize); in kmem_log_walk_init() [all …]
|
/illumos-gate/usr/src/lib/fm/libdiskstatus/common/ |
H A D | ds_scsi.c | 484 scsi_log_header_t *lhp; in verify_logpage() local 493 if ((lhp = calloc(buflen, 1)) == NULL) in verify_logpage() 501 free(lhp); in verify_logpage() 509 PC_CUMULATIVE, (caddr_t)lhp, buflen, &kp, &asc, &ascq); in verify_logpage() 512 log_length = BE_16(lhp->lh_length); in verify_logpage() 514 free(lhp); in verify_logpage() 519 (((char *)lhp) + sizeof (scsi_log_header_t)), in verify_logpage() 521 free(lhp); in verify_logpage() 529 free(lhp); in verify_logpage() 1010 scsi_log_header_t *lhp; in analyze_one_logpage() local [all …]
|
/illumos-gate/usr/src/lib/libctf/common/ |
H A D | ctf_lib.c | 591 const GElf_Shdr *lhp = &sp[shp->sh_link]; in ctf_fdcreate_int() local 597 lhp->sh_name >= sp[shstrndx].sh_size) in ctf_fdcreate_int() 618 strsect.cts_name = strs + lhp->sh_name; in ctf_fdcreate_int() 619 strsect.cts_type = lhp->sh_type; in ctf_fdcreate_int() 620 strsect.cts_flags = lhp->sh_flags; in ctf_fdcreate_int() 621 strsect.cts_size = lhp->sh_size; in ctf_fdcreate_int() 622 strsect.cts_entsize = lhp->sh_entsize; in ctf_fdcreate_int() 623 strsect.cts_offset = (off64_t)lhp->sh_offset; in ctf_fdcreate_int()
|
/illumos-gate/usr/src/lib/libproc/common/ |
H A D | Pstack.c | 228 sort_uclist(const void *lhp, const void *rhp) in sort_uclist() argument 230 uintptr_t lhs = *((const uintptr_t *)lhp); in sort_uclist()
|
H A D | Pstack.h | 48 int sort_uclist(const void *lhp, const void *rhp);
|
/illumos-gate/usr/src/cmd/sed/ |
H A D | compile.c | 874 struct labhash **lhp, *lh; in enterlabel() local 880 lhp = &labels[h & LHMASK]; in enterlabel() 881 for (lh = *lhp; lh != NULL; lh = lh->lh_next) in enterlabel() 886 lh->lh_next = *lhp; in enterlabel() 890 *lhp = lh; in enterlabel()
|
/illumos-gate/usr/src/cmd/fs.d/nfs/nfslog/ |
H A D | nfslog_elf.c | 1291 nfslog_record_header *lhp, char *principal_name, char *tag, in nfsl_elf_record_header_print() argument 1304 nfsl_get_time((time_t)lhp->rh_timestamp.tv_sec)); in nfsl_elf_record_header_print() 1306 lhp->rh_reclen); in nfsl_elf_record_header_print() 1314 progname, lhp->rh_version, disp->procname); in nfsl_elf_record_header_print() 1316 NFSL_AUTH_FLAVOR_PRINT(lhp->rh_auth_flavor)); in nfsl_elf_record_header_print() 1333 elfbufoffset += sprintf(&elfbuf[elfbufoffset], " 0x%lx", lhp->rh_uid); in nfsl_elf_record_header_print() 1334 if (((pwp = getpwuid(lhp->rh_uid)) != NULL) && (pwp->pw_name != NULL)) { in nfsl_elf_record_header_print() 1341 elfbufoffset += sprintf(&elfbuf[elfbufoffset], " 0x%lx", lhp->rh_gid); in nfsl_elf_record_header_print()
|
/illumos-gate/usr/src/cmd/mdb/common/modules/libumem/ |
H A D | umem.c | 1731 umem_log_header_t *lhp; in umem_log_walk_init() local 1749 lhp = &ulw->ulw_lh; in umem_log_walk_init() 1751 if (mdb_vread(lhp, sizeof (umem_log_header_t), lp) == -1) { in umem_log_walk_init() 1757 ulw->ulw_size = lhp->lh_chunksize * lhp->lh_nchunks; in umem_log_walk_init() 1759 maxndx = lhp->lh_chunksize / UMEM_BUFCTL_AUDIT_SIZE - 1; in umem_log_walk_init() 1762 (uintptr_t)lhp->lh_base) == -1) { in umem_log_walk_init() 1763 mdb_warn("failed to read log at base %p", lhp->lh_base); in umem_log_walk_init() 1769 ulw->ulw_sorted = mdb_alloc(maxndx * lhp->lh_nchunks * in umem_log_walk_init() 1772 for (i = 0, k = 0; i < lhp->lh_nchunks; i++) { in umem_log_walk_init() 1774 ((uintptr_t)ulw->ulw_base + i * lhp->lh_chunksize); in umem_log_walk_init() [all …]
|
/illumos-gate/usr/src/uts/sun4u/opl/io/oplmsu/ |
H A D | oplmsu.c | 1087 oplmsu_open_msu(dev_info_t *dip, ldi_ident_t *lip, ldi_handle_t *lhp) in oplmsu_open_msu() argument 1103 ldi_open_by_dev(&devt, OTYP_CHR, (FREAD|FWRITE), kcred, lhp, *lip); in oplmsu_open_msu()
|