Home
last modified time | relevance | path

Searched refs:mhp (Results 1 – 19 of 19) sorted by relevance

/illumos-gate/usr/src/uts/common/os/
H A Dmem_config.c770 struct mem_handle *mhp; in kphysm_allocate_mem_handle() local
772 mhp = kmem_zalloc(sizeof (struct mem_handle), KM_SLEEP); in kphysm_allocate_mem_handle()
773 mutex_init(&mhp->mh_mutex, NULL, MUTEX_DEFAULT, NULL); in kphysm_allocate_mem_handle()
775 mutex_enter(&mhp->mh_mutex); in kphysm_allocate_mem_handle()
777 mhp->mh_exthandle = (memhandle_t)(uintptr_t)(++handle_gen); in kphysm_allocate_mem_handle()
778 mhp->mh_next = mem_handle_head; in kphysm_allocate_mem_handle()
779 mem_handle_head = mhp; in kphysm_allocate_mem_handle()
782 return (mhp); in kphysm_allocate_mem_handle()
786 kphysm_free_mem_handle(struct mem_handle *mhp) in kphysm_free_mem_handle() argument
790 ASSERT(mutex_owned(&mhp->mh_mutex)); in kphysm_free_mem_handle()
[all …]
H A Dmodhash.c478 mod_hash_t *mhp, *mhpp; in mod_hash_destroy_hash() local
492 for (mhp = mh_head; mhp != NULL; mhp = mhp->mh_next) { in mod_hash_destroy_hash()
493 if (mhp == hash) { in mod_hash_destroy_hash()
494 mhpp->mh_next = mhp->mh_next; in mod_hash_destroy_hash()
497 mhpp = mhp; in mod_hash_destroy_hash()
/illumos-gate/usr/src/lib/fm/topo/libtopo/common/
H A Dtopo_module.c113 topo_modhash_lock(topo_modhash_t *mhp) in topo_modhash_lock() argument
115 (void) pthread_mutex_lock(&mhp->mh_lock); in topo_modhash_lock()
119 topo_modhash_unlock(topo_modhash_t *mhp) in topo_modhash_unlock() argument
121 (void) pthread_mutex_unlock(&mhp->mh_lock); in topo_modhash_unlock()
171 topo_modhash_t *mhp = thp->th_modhash; in topo_mod_lookup() local
173 topo_modhash_lock(mhp); in topo_mod_lookup()
174 mod = topo_modhash_lookup(mhp, name); in topo_mod_lookup()
177 topo_modhash_unlock(mhp); in topo_mod_lookup()
263 topo_modhash_t *mhp; in topo_modhash_create() local
265 if ((mhp = topo_hdl_zalloc(thp, sizeof (topo_modhash_t))) == NULL) in topo_modhash_create()
[all …]
/illumos-gate/usr/src/uts/common/io/mac/plugins/
H A Dmac_wifi.c278 mac_wifi_header_info(mblk_t *mp, void *pdata, mac_header_info_t *mhp) in mac_wifi_header_info() argument
317 mhp->mhi_origsap = ntohs(llc->illc_ether_type); in mac_wifi_header_info()
318 mhp->mhi_bindsap = mhp->mhi_origsap; in mac_wifi_header_info()
319 mhp->mhi_pktsize = 0; in mac_wifi_header_info()
320 mhp->mhi_hdrsize = (uintptr_t)llcp + sizeof (*llc) - in mac_wifi_header_info()
331 mhp->mhi_bindsap = DLS_SAP_LLC; in mac_wifi_header_info()
332 mhp->mhi_hdrsize -= sizeof (*llc); in mac_wifi_header_info()
333 mhp->mhi_pktsize = mhp->mhi_hdrsize + mhp->mhi_origsap; in mac_wifi_header_info()
340 mhp->mhi_daddr = wh->i_addr1; in mac_wifi_header_info()
341 mhp->mhi_saddr = wh->i_addr2; in mac_wifi_header_info()
[all …]
/illumos-gate/usr/src/cmd/fm/fmd/common/
H A Dfmd_module.c1022 fmd_modhash_t *mhp = fmd_alloc(sizeof (fmd_modhash_t), FMD_SLEEP); in fmd_modhash_create() local
1024 (void) pthread_rwlock_init(&mhp->mh_lock, NULL); in fmd_modhash_create()
1025 mhp->mh_hashlen = fmd.d_str_buckets; in fmd_modhash_create()
1026 mhp->mh_hash = fmd_zalloc(sizeof (void *) * mhp->mh_hashlen, FMD_SLEEP); in fmd_modhash_create()
1027 mhp->mh_nelems = 0; in fmd_modhash_create()
1029 return (mhp); in fmd_modhash_create()
1033 fmd_modhash_destroy(fmd_modhash_t *mhp) in fmd_modhash_destroy() argument
1038 for (i = 0; i < mhp->mh_hashlen; i++) { in fmd_modhash_destroy()
1039 for (mp = mhp->mh_hash[i]; mp != NULL; mp = nmp) { in fmd_modhash_destroy()
1046 fmd_free(mhp->mh_hash, sizeof (void *) * mhp->mh_hashlen); in fmd_modhash_destroy()
[all …]
H A Dfmd_builtin.c104 fmd_builtin_loadall(fmd_modhash_t *mhp) in fmd_builtin_loadall() argument
117 if (fmd_modhash_load(mhp, bp->bltin_name, in fmd_builtin_loadall()
H A Dfmd_xprt.c331 fmd_xprt_subscribe_modhash(fmd_xprt_impl_t *xip, fmd_modhash_t *mhp) in fmd_xprt_subscribe_modhash() argument
338 (void) pthread_rwlock_rdlock(&mhp->mh_lock); in fmd_xprt_subscribe_modhash()
340 for (i = 0; i < mhp->mh_hashlen; i++) { in fmd_xprt_subscribe_modhash()
341 for (mp = mhp->mh_hash[i]; mp != NULL; mp = mp->mod_next) in fmd_xprt_subscribe_modhash()
350 for (i = 0; i < mhp->mh_hashlen; i++) { in fmd_xprt_subscribe_modhash()
351 for (mp = mhp->mh_hash[i]; mp != NULL; mp = mp->mod_next) { in fmd_xprt_subscribe_modhash()
359 for (i = 0; i < mhp->mh_hashlen; i++) { in fmd_xprt_subscribe_modhash()
360 for (mp = mhp->mh_hash[i]; mp != NULL; mp = mp->mod_next) in fmd_xprt_subscribe_modhash()
364 (void) pthread_rwlock_unlock(&mhp->mh_lock); in fmd_xprt_subscribe_modhash()
/illumos-gate/usr/src/cmd/ndmpd/tlm/
H A Dtlm_backup_reader.c1205 ndmp_metadata_header_ext_t *mhp; in zfs_put_prop_cb() local
1216 mhp = mhd->ml_xhdr; in zfs_put_prop_cb()
1217 mpp = &mhp->nh_property[mhp->nh_count]; in zfs_put_prop_cb()
1219 if (mhp->nh_count * sizeof (ndmp_metadata_property_ext_t) + in zfs_put_prop_cb()
1220 sizeof (ndmp_metadata_header_ext_t) > mhp->nh_total_bytes) in zfs_put_prop_cb()
1225 mhp->nh_count++; in zfs_put_prop_cb()
1241 sourcestr = mhp->nh_dataset; in zfs_put_prop_cb()
1255 mhp->nh_count++; in zfs_put_prop_cb()
1266 ndmp_metadata_header_ext_t *mhp; in zfs_put_quota_cb() local
1274 mhp = mhd->ml_xhdr; in zfs_put_quota_cb()
[all …]
H A Dtlm_restore_writer.c2323 ndmp_metadata_header_t *mhp; in ndmp_iter_zfs() local
2356 while ((mhp = (ndmp_metadata_header_t *)get_read_buffer(size, &rv, in ndmp_iter_zfs()
2360 if (strncmp(mhp->nh_magic, ZFS_META_MAGIC, in ndmp_iter_zfs()
2361 sizeof (mhp->nh_magic)) != 0 && in ndmp_iter_zfs()
2362 strncmp(mhp->nh_magic, ZFS_META_MAGIC_EXT, in ndmp_iter_zfs()
2363 sizeof (mhp->nh_magic)) != 0) { in ndmp_iter_zfs()
2370 if (strncmp(mhp->nh_magic, ZFS_META_MAGIC_EXT, in ndmp_iter_zfs()
2371 sizeof (mhp->nh_magic)) == 0) { in ndmp_iter_zfs()
2372 mhpx = (ndmp_metadata_header_ext_t *)mhp; in ndmp_iter_zfs()
2384 (void) memcpy(pp, (char *)mhp, (actual_size < size) ? in ndmp_iter_zfs()
[all …]
/illumos-gate/usr/src/cmd/boot/bootadm/
H A Dbootadm.c6456 mhash_t *mhp; local
6472 mhp = s_calloc(1, sizeof (mhash_t));
6492 mcp->mc_next = mhp->mh_hash[idx];
6493 mhp->mh_hash[idx] = mcp;
6499 return (mhp);
6503 free_mnttab(mhash_t *mhp) argument
6509 while ((mcp = mhp->mh_hash[i]) != NULL) {
6510 mhp->mh_hash[i] = mcp->mc_next;
6519 assert(mhp->mh_hash[i] == NULL);
6521 free(mhp);
[all …]
/illumos-gate/usr/src/uts/common/inet/sockmods/
H A Dsockmod_pfp.c1419 pfp_open_index(int index, mac_handle_t *mhp, mac_client_handle_t *mcip, in pfp_open_index() argument
1455 *mhp = mh; in pfp_open_index()
/illumos-gate/usr/src/uts/common/io/mac/
H A Dmac_client.c321 mac_open(const char *macname, mac_handle_t *mhp) in mac_open() argument
346 *mhp = (mac_handle_t)mip; in mac_open()
357 *mhp = (mac_handle_t)mip; in mac_open()
372 mac_open_by_linkid(datalink_id_t linkid, mac_handle_t *mhp) in mac_open_by_linkid() argument
382 err = mac_open(dls_devnet_mac(dlh), mhp); in mac_open_by_linkid()
392 mac_open_by_linkname(const char *link, mac_handle_t *mhp) in mac_open_by_linkname() argument
399 return (mac_open_by_linkid(linkid, mhp)); in mac_open_by_linkname()
H A Dmac_provider.c161 mac_register(mac_register_t *mregp, mac_handle_t *mhp) in mac_register() argument
489 *mhp = (mac_handle_t)mip; in mac_register()
/illumos-gate/usr/src/uts/sun4u/ngdr/io/
H A Ddr_mem.c71 static int dr_reserve_mem_spans(memhandle_t *mhp, struct memlist *mlist);
2012 dr_reserve_mem_spans(memhandle_t *mhp, struct memlist *ml) in dr_reserve_mem_spans() argument
2031 err = kphysm_del_span(*mhp, base, npgs); in dr_reserve_mem_spans()
/illumos-gate/usr/src/uts/sun4u/io/
H A Dsbd_mem.c61 static int sbd_reserve_mem_spans(memhandle_t *mhp,
1488 sbd_reserve_mem_spans(memhandle_t *mhp, struct memlist *ml) in sbd_reserve_mem_spans() argument
1507 err = kphysm_del_span(*mhp, base, npgs); in sbd_reserve_mem_spans()
H A Dsbd.c3925 sbd_get_memhandle(sbd_handle_t *hp, dev_info_t *dip, memhandle_t *mhp) in sbd_get_memhandle() argument
3948 *mhp = mp->sbm_memhandle; in sbd_get_memhandle()
/illumos-gate/usr/src/uts/sun4u/opl/io/
H A Ddr_mem.c77 static int dr_reserve_mem_spans(memhandle_t *mhp,
2082 dr_reserve_mem_spans(memhandle_t *mhp, struct memlist *ml) in dr_reserve_mem_spans() argument
2101 err = kphysm_del_span(*mhp, base, npgs); in dr_reserve_mem_spans()
/illumos-gate/usr/src/uts/sun4u/sys/
H A Dsbdpriv.h736 memhandle_t *mhp);
/illumos-gate/usr/src/uts/common/io/scsi/targets/
H A Dsd.c4451 struct mode_header_grp2 *mhp = in sd_get_physical_geometry() local
4454 bd_len = (mhp->bdesc_length_hi << 8) | mhp->bdesc_length_lo; in sd_get_physical_geometry()
4529 struct mode_header_grp2 *mhp = in sd_get_physical_geometry() local
4531 bd_len = (mhp->bdesc_length_hi << 8) | mhp->bdesc_length_lo; in sd_get_physical_geometry()
8730 struct mode_header_grp2 *mhp = in sd_get_caching_mode_page() local
8732 *bdlen = (mhp->bdesc_length_hi << 8) | mhp->bdesc_length_lo; in sd_get_caching_mode_page()
8841 struct mode_header_grp2 *mhp = in sd_cache_control() local
8843 mhp->bdesc_length_hi = bdlen >> 8; in sd_cache_control()
8844 mhp->bdesc_length_lo = (uchar_t)bdlen & 0xff; in sd_cache_control()