/illumos-gate/usr/src/lib/libslp/clib/ |
H A D | SLPOpen.c | 44 if (!(hp = malloc(sizeof (*hp)))) { in SLPOpen() 61 if (!(hp->locale = strdup(hp->locale))) { in SLPOpen() 62 free(hp); in SLPOpen() 67 hp->cancel = 0; in SLPOpen() 81 hp->q = NULL; in SLPOpen() 92 *phSLP = hp; in SLPOpen() 98 if (hp->tcp_lock) free(hp->tcp_lock); in slp_cleanup_handle() 99 if (hp->tcp_wait) free(hp->tcp_wait); in slp_cleanup_handle() 105 free(hp); in slp_cleanup_handle() 137 if (thr_self() == hp->consumer_tid || hp->close_on_end) { in SLPClose() [all …]
|
H A D | slp_ua_common.c | 37 slp_handle_impl_t *hp; member 51 slp_handle_impl_t *hp; in slp_ua_common() local 76 args->hp = hp; in slp_ua_common() 86 hp->q = q; in slp_ua_common() 95 hp->producer_tid = tid; in slp_ua_common() 97 if (hp->async) { in slp_ua_common() 106 hp->cancel = 1; in slp_ua_common() 123 slp_handle_impl_t *hp; in consumer() local 129 hp = args->hp; in consumer() 156 hp->cancel = 1; in consumer() [all …]
|
H A D | slp_net.c | 132 if (!(hp->tcp_lock = malloc(sizeof (*(hp->tcp_lock))))) { in slp_uc_tcp_send() 140 if (!(hp->tcp_wait = malloc(sizeof (*(hp->tcp_wait))))) { in slp_uc_tcp_send() 161 rqst->hp = hp; in slp_uc_tcp_send() 176 (void) cond_wait(hp->tcp_wait, hp->tcp_lock); in slp_tcp_wait() 227 udp_make_msghdr(sin, hp->msg.iov, hp->msg.iovlen, msg); in slp_uc_udp_send() 240 !hp->cancel; in slp_uc_udp_send() 351 udp_make_msghdr(sin, hp->msg.iov, hp->msg.iovlen, msg); in slp_mc_send() 369 !hp->cancel; in slp_mc_send() 482 hp = rqst->hp; in tcp_thread() 491 if (hp->cancel) in tcp_thread() [all …]
|
/illumos-gate/usr/src/uts/common/refhash/ |
H A D | refhash.c | 35 refhash_t *hp; in refhash_create() local 39 if (hp == NULL) in refhash_create() 58 hp->rh_hash = hash; in refhash_create() 59 hp->rh_cmp = cmp; in refhash_create() 62 return (hp); in refhash_create() 70 kmem_free(hp->rh_buckets, hp->rh_bucket_count * sizeof (list_t)); in refhash_destroy() 80 bucket = hp->rh_hash(obj_to_tag(hp, op)) % hp->rh_bucket_count; in refhash_insert() 95 bucket = hp->rh_hash(obj_to_tag(hp, op)) % hp->rh_bucket_count; in refhash_delete() 98 hp->rh_dtor(op); in refhash_delete() 120 bucket = hp->rh_hash(tp) % hp->rh_bucket_count; in refhash_lookup() [all …]
|
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/edit/ |
H A D | history.c | 336 hp->histind = first = hist_nearend(hp,hp->histfp,hsize-size); in sh_histinit() 369 hp = hist_trim(hp,(int)hp->histind-maxlines); in sh_histinit() 371 sfdisc(hp->histfp,&hp->histdisc); in sh_histinit() 717 hp->histcmds[hist_ind(hp,++hp->histind)] = count; in hist_eof() 727 hp->histind = hp->histind-hp->histsize + oldind +2; in hist_eof() 760 c = hist_ind(hp,--hp->histind); in hist_cancel() 761 hp->histcmds[c] = hp->histcnt; in hist_cancel() 861 c = hist_ind(hp,++hp->histind); in hist_write() 862 hp->histcmds[c] = hp->histcnt; in hist_write() 869 hp->histmarker = hp->histcmds[hist_ind(hp,c)] = hp->histcnt; in hist_write() [all …]
|
/illumos-gate/usr/src/common/ctf/ |
H A D | ctf_hash.c | 56 hp->h_buckets = ctf_alloc(sizeof (ushort_t) * hp->h_nbuckets); in ctf_hash_create() 57 hp->h_chains = ctf_alloc(sizeof (ctf_helem_t) * hp->h_nelems); in ctf_hash_create() 59 if (hp->h_buckets == NULL || hp->h_chains == NULL) { in ctf_hash_create() 64 bzero(hp->h_buckets, sizeof (ushort_t) * hp->h_nbuckets); in ctf_hash_create() 65 bzero(hp->h_chains, sizeof (ctf_helem_t) * hp->h_nelems); in ctf_hash_create() 73 return (hp->h_nelems ? hp->h_nelems - 1 : 0); in ctf_hash_size() 100 ctf_helem_t *hep = &hp->h_chains[hp->h_free]; in ctf_hash_insert() 106 if (hp->h_free >= hp->h_nelems) in ctf_hash_insert() 122 hp->h_buckets[h] = hp->h_free++; in ctf_hash_insert() 170 if (hp->h_buckets != NULL && hp->h_nbuckets != 1) { in ctf_hash_destroy() [all …]
|
/illumos-gate/usr/src/lib/scsi/libscsi/common/ |
H A D | scsi_subr.c | 69 hp->lsh_errno = err; in libscsi_set_errno() 70 hp->lsh_errmsg[0] = '\0'; in libscsi_set_errno() 131 return (hp->lsh_errno); in libscsi_errno() 138 (void) strlcpy(hp->lsh_errmsg, libscsi_strerror(hp->lsh_errno), in libscsi_errmsg() 141 return (hp->lsh_errmsg); in libscsi_errmsg() 195 libscsi_hdl_t *hp; in libscsi_init() local 204 hp->lsh_version = version; in libscsi_init() 206 return (hp); in libscsi_init() 214 if (hp == NULL) in libscsi_fini() 222 libscsi_free(hp, eip); in libscsi_fini() [all …]
|
/illumos-gate/usr/src/lib/libdtrace/common/ |
H A D | dt_inttab.c | 55 dt_inthash_t *hp, *np; in dt_inttab_destroy() local 57 for (hp = ip->int_head; hp != NULL; hp = np) { in dt_inttab_destroy() 58 np = hp->inh_next; in dt_inttab_destroy() 70 dt_inthash_t *hp; in dt_inttab_insert() local 73 for (hp = ip->int_hash[h]; hp != NULL; hp = hp->inh_hash) { in dt_inttab_insert() 74 if (hp->inh_value == value && hp->inh_flags == flags) in dt_inttab_insert() 83 hp->inh_next = NULL; in dt_inttab_insert() 88 ip->int_hash[h] = hp; in dt_inttab_insert() 92 ip->int_head = hp; in dt_inttab_insert() 96 ip->int_tail = hp; in dt_inttab_insert() [all …]
|
/illumos-gate/usr/src/uts/common/io/ |
H A D | bofi.c | 1505 for (hp = hhashp->hnext; hp != hhashp; hp = hp->hnext) { in bofi_ioctl() 1621 for (hp = hhashp->hnext; hp != hhashp; hp = hp->hnext) { in bofi_ioctl() 3230 for (hp = hhashp->hnext; hp != hhashp; hp = hp->hnext) in bofi_map() 3461 for (hp = hhashp->hnext; hp != hhashp; hp = hp->hnext) in bofi_dma_freehdl() 3523 for (hp = hhashp->hnext; hp != hhashp; hp = hp->hnext) in bofi_dma_bindhdl() 3654 for (hp = hhashp->hnext; hp != hhashp; hp = hp->hnext) in bofi_dma_unbindhdl() 3737 for (hp = hhashp->hnext; hp != hhashp; hp = hp->hnext) in bofi_dma_flush() 3815 for (hp = hhashp->hnext; hp != hhashp; hp = hp->hnext) in bofi_dma_win() 3874 for (hp = hhashp->hnext; hp != hhashp; hp = hp->hnext) in bofi_dma_ctl() 4423 for (hp = hhashp->hnext; hp != hhashp; hp = hp->hnext) in bofi_check_dma_hdl() [all …]
|
/illumos-gate/usr/src/cmd/ipf/lib/common/ |
H A D | printhashdata.c | 16 void printhashdata(hp, opts) in printhashdata() argument 17 iphtable_t *hp; in printhashdata() 24 switch (hp->iph_type & ~IPHASH_ANON) 31 if (hp->iph_flags & FR_INQUE) 39 PRINTF("%#x", hp->iph_type); 51 switch (hp->iph_unit) 66 PRINTF("#%d", hp->iph_unit); 74 hp->iph_name, (u_long)hp->iph_size); 75 if (hp->iph_seed != 0) 94 (u_long)hp->iph_size, hp->iph_seed); [all …]
|
/illumos-gate/usr/src/uts/sun4u/ngdr/io/ |
H A D | dr.c | 623 hp->h_devset = dr_dev2devset(&hp->h_sbdcmd.cmd_cm.c_id); in dr_ioctl() 690 FREESTRUCT(hp->h_opts.copts, char, hp->h_opts.size); in dr_ioctl() 1008 f, hp->h_err->e_code, hp->h_err->e_rsc); in dr_copyout_errs() 1063 hp->h_err = drmach_pre_op(cmd, bp->b_id, &hp->h_opts); in dr_pre_op() 1129 hp->h_err = drmach_post_op(cmd, bp->b_id, &hp->h_opts); in dr_post_op() 1207 hp->h_sbdcmd.cmd_getncm.g_ncm = dr_get_ncm(hp); in dr_exec_op() 1287 hp->h_err = drmach_board_test(bp->b_id, &hp->h_opts, in dr_test_board() 1363 hp->h_err = drmach_board_connect(bp->b_id, &hp->h_opts); in dr_connect() 1364 if (hp->h_err) in dr_connect() 2165 shp = hp; in dr_dev_status() [all …]
|
/illumos-gate/usr/src/lib/libnwam/common/ |
H A D | libnwam_object.c | 129 nwam_free(hp); in nwam_create() 264 nwam_free(hp); in nwam_walk() 271 nwam_free(hp); in nwam_walk() 283 if (hp != NULL) { in nwam_free() 286 free(hp); in nwam_free() 305 nwam_free(hp); in nwam_copy() 333 assert(hp != NULL && hp->nwh_data != NULL && cb != NULL); in nwam_walk_props() 428 (void) nwam_request_action(hp->nwh_object_type, hp->nwh_name, in nwam_commit() 490 nwam_free(hp); in nwam_destroy() 503 return (nwam_request_action(hp->nwh_object_type, hp->nwh_name, in nwam_enable() [all …]
|
/illumos-gate/usr/src/uts/i86pc/io/dr/ |
H A D | dr.c | 621 hp->h_devset = dr_dev2devset(&hp->h_sbdcmd.cmd_cm.c_id); in dr_ioctl() 688 FREESTRUCT(hp->h_opts.copts, char, hp->h_opts.size); in dr_ioctl() 1005 f, hp->h_err->e_code, hp->h_err->e_rsc); in dr_copyout_errs() 1197 hp->h_sbdcmd.cmd_getncm.g_ncm = dr_get_ncm(hp); in dr_exec_op() 1277 hp->h_err = drmach_board_test(bp->b_id, &hp->h_opts, in dr_test_board() 1352 hp->h_err = drmach_board_connect(bp->b_id, &hp->h_opts); in dr_connect() 1353 if (hp->h_err) in dr_connect() 1357 if (hp->h_err) in dr_connect() 1404 hp->h_err = drmach_board_disconnect(bp->b_id, &hp->h_opts); in dr_disconnect() 2133 shp = hp; in dr_dev_status() [all …]
|
/illumos-gate/usr/src/uts/common/vm/ |
H A D | vm_seg.c | 290 ASSERT((struct seg_phash *)hp->p_hnext != hp); in seg_padd_abuck() 291 ASSERT((struct seg_phash *)hp->p_hprev != hp); in seg_padd_abuck() 292 ASSERT(hp->p_hnext == hp->p_hprev); in seg_padd_abuck() 344 ASSERT((struct seg_phash *)hp->p_hnext == hp); in seg_premove_abuck() 345 ASSERT((struct seg_phash *)hp->p_hprev == hp); in seg_premove_abuck() 1051 if (hp->p_hnext == (struct seg_pcache *)hp) { in seg_ppurge_async() 1101 if (hp->p_hnext == (struct seg_pcache *)hp) { in seg_ppurge_async() 1431 hp->p_hnext = (struct seg_pcache *)hp; in seg_pinit() 1432 hp->p_hprev = (struct seg_pcache *)hp; in seg_pinit() 1468 hp->p_hnext = (struct seg_pcache *)hp; in seg_pinit() [all …]
|
/illumos-gate/usr/src/uts/sun4u/sys/ |
H A D | sbd.h | 82 int sbdp_assign_board(sbdp_handle_t *hp); 83 int sbdp_connect_board(sbdp_handle_t *hp); 84 int sbdp_disconnect_board(sbdp_handle_t *hp); 85 int sbdp_get_board_num(sbdp_handle_t *hp, dev_info_t *dip); 87 int sbdp_cancel_component_release(sbdp_handle_t *hp); 95 int sbdp_get_unit_num(sbdp_handle_t *hp, dev_info_t *dip); 99 int sbdp_get_mem_size(sbdp_handle_t *hp); 101 int sbdp_poweroff_board(sbdp_handle_t *hp); 102 int sbdp_poweron_board(sbdp_handle_t *hp); 104 int sbdp_test_board(sbdp_handle_t *hp, sbdp_opts_t *opts); [all …]
|
/illumos-gate/usr/src/uts/sun4u/io/ |
H A D | sbd.c | 795 sbd_board_t *sbp = hp ? SBDH2BD(hp->h_sbd) : NULL; in sbd_get_devtype() 1455 hp->h_err = ep; in sbd_get_handle() 1467 return (hp); in sbd_get_handle() 1532 FREESTRUCT(hp->h_opts.copts, char, hp->h_opts.size); in sbd_release_handle() 1646 hp->h_opts.copts = GETSTRUCT(char, hp->h_opts.size); in sbd_copyin_ioarg() 1861 rv = sbd_copyin_ioarg(hp, hp->h_mode, cmd, in sbd_pre_op() 1997 (void) sbd_copyout_errs(hp->h_mode, hp->h_iap, in sbd_post_op() 4261 sbd_io_cnt(hp, devset) + sbd_mem_cnt(hp, devset); in sbd_get_ncm() 4263 error = sbd_copyout_ioarg(hp->h_mode, hp->h_cmd, cmdp, in sbd_get_ncm() 4306 ncm = sbd_cpu_cnt(hp, devset) + sbd_io_cnt(hp, devset) + in sbd_status() [all …]
|
/illumos-gate/usr/src/uts/intel/os/ |
H A D | ddi_i86.c | 151 ddi_acc_impl_t *hp; in impl_acc_hdl_alloc() local 173 hp->ahi_common.ah_platform_private = (void *)hp; in impl_acc_hdl_alloc() 186 ddi_acc_impl_t *hp; in impl_acc_hdl_free() local 193 if (hp) { in impl_acc_hdl_free() 212 ddi_acc_hdl_t *hp; in impl_acc_check() local 216 ASSERT(hp); in impl_acc_check() 219 pfn = hp->ah_pfn; in impl_acc_check() 250 errp = hp->ahi_err; in impl_acc_err_init() 272 ddi_acc_impl_t *hp; in impl_acc_hdl_init() local 335 hp->ahi_rep_get16 = in impl_acc_hdl_init() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/snoop/ |
H A D | snoop_ipaddr.c | 150 hp ? hp->h_name : inet_ntoa(ipaddr), in iplookup() 151 hp ? hp->h_aliases : NULL); in iplookup() 152 if (hp != NULL) in iplookup() 153 freehostent(hp); in iplookup() 192 hp = NULL; in ip6lookup() 195 if (hp != NULL) in ip6lookup() 203 if (hp != NULL) in ip6lookup() 204 freehostent(hp); in ip6lookup() 256 n->h_next = *hp; in addhost() 257 *hp = n; in addhost() [all …]
|
/illumos-gate/usr/src/uts/common/os/ |
H A D | dumpsubr.c | 575 for (hp = old->helper; hp != hpend; hp++) { in dump_update_clevel() 652 for (hp = new->helper; hp != hpend; hp++) { in dump_update_clevel() 1035 for (hp = cfg->helper; hp < endhp; hp++) { in dumpsys_get_maxmem() 1926 hp->in = dumpsys_copy_page(hp, hp->in); in dumpsys_sread() 2102 hp->cpout != NULL && hp->out + osize > hp->cpout->size) { in dumpsys_lzjbrun() 2109 dumpsys_swrite(hp, hp->cpout, hp->out); in dumpsys_lzjbrun() 2217 for (hp = dumpcfg.helper; hp != hpend; hp++) { in dumpsys_helper() 2286 hp->in = dumpsys_copy_page(hp, hp->in); in dumpsys_lzjb_page() 2634 for (hp = cfg->helper; hp != hpend; hp++) { in dumpsys_metrics() 2884 for (hp = dumpcfg.helper; hp != hpend; hp++) { in dumpsys() [all …]
|
/illumos-gate/usr/src/cmd/mailx/ |
H A D | tty.c | 130 hp->h_to = addto(NOSTR, readtty("To: ", hp->h_to)); in grabh() 132 hp->h_seq++; in grabh() 135 hp->h_subject = readtty("Subject: ", hp->h_subject); in grabh() 140 hp->h_cc = addto(NOSTR, readtty("Cc: ", hp->h_cc)); in grabh() 145 hp->h_bcc = addto(NOSTR, readtty("Bcc: ", hp->h_bcc)); in grabh() 150 hp->h_subject = readtty("Subject: ", hp->h_subject); in grabh() 499 hp->h_to = addto(NOSTR, readtty("To: ", hp->h_to)); in grabh() 508 hp->h_subject = readtty("Subject: ", hp->h_subject); in grabh() 517 hp->h_cc = addto(NOSTR, readtty("Cc: ", hp->h_cc)); in grabh() 526 hp->h_bcc = addto(NOSTR, readtty("Bcc: ", hp->h_bcc)); in grabh() [all …]
|
/illumos-gate/usr/src/lib/scsi/plugins/scsi/engines/uscsi/ |
H A D | uscsi.c | 50 uscsi_open(libscsi_hdl_t *hp, const void *target) in uscsi_open() argument 59 libscsi_free(hp, dp); in uscsi_open() 66 libscsi_free(hp, dp->dev); in uscsi_open() 67 libscsi_free(hp, dp); in uscsi_open() 75 uscsi_close(libscsi_hdl_t *hp, void *private) in uscsi_close() argument 85 libscsi_free(hp, dp->dev); in uscsi_close() 86 libscsi_free(hp, dp); in uscsi_close() 120 return (libscsi_error(hp, ESCSI_BOGUSFLAGS, in xlate_flags() 146 if (xlate_flags(hp, flags, &cmd.uscsi_flags) != 0) in uscsi_exec() 188 return (libscsi_error(hp, ESCSI_IO, "I/O " in uscsi_exec() [all …]
|
/illumos-gate/usr/src/uts/sun4/os/ |
H A D | ddi_impl.c | 1268 ddi_acc_impl_t *hp; in impl_acc_hdl_alloc() local 1291 hp->ahi_common.ah_platform_private = (void *)hp; in impl_acc_hdl_alloc() 1304 ddi_acc_impl_t *hp; in impl_acc_hdl_free() local 1311 if (hp) { in impl_acc_hdl_free() 1361 ddi_acc_hdl_t *hp; in impl_acc_check() local 1365 ASSERT(hp); in impl_acc_check() 1368 pfn = hp->ah_pfn; in impl_acc_check() 1461 hp->ahi_fault = 0; in impl_acc_hdl_init() 1472 (*hp->ahi_fault_notify)(hp); in i_ddi_acc_set_fault() 1483 (*hp->ahi_fault_notify)(hp); in i_ddi_acc_clr_fault() [all …]
|
/illumos-gate/usr/src/uts/sun4u/serengeti/io/ |
H A D | sbdp_mbox.c | 136 if (hp->h_opts != NULL && hp->h_opts->copts != NULL) { in sbdp_get_board_status() 262 sep = hp->h_err; in sbdp_assign_board() 266 if (hp->h_opts != NULL && hp->h_opts->copts != NULL) { in sbdp_assign_board() 313 sep = hp->h_err; in sbdp_unassign_board() 317 if (hp->h_opts != NULL && hp->h_opts->copts != NULL) { in sbdp_unassign_board() 358 rv = prom_serengeti_attach_board(hp->h_wnode, hp->h_board); in sg_attach_board() 378 rv = prom_serengeti_detach_board(hp->h_wnode, hp->h_board); in sg_detach_board() 413 if (hp->h_opts != NULL && hp->h_opts->copts != NULL) { in sbdp_connect_board() 514 if (hp->h_opts != NULL && hp->h_opts->copts != NULL) { in sbdp_disconnect_board() 591 if (hp->h_opts != NULL && hp->h_opts->copts != NULL) { in sbdp_poweroff_board() [all …]
|
/illumos-gate/usr/src/cmd/csh/ |
H A D | sh.hist.c | 33 struct Hist *hp, *np; in savehist() local 55 for (hp = &Histlist; np = hp->Hnext;) in savehist() 59 hp = np; in savehist() 93 freelex(&hp->Hlex); in hfree() 94 xfree( (tchar *)hp); in hfree() 142 if (hp == 0) in dohist1() 145 hp->Href++; in dohist1() 149 phist(hp, hflg); in dohist1() 153 phist(hp, hflg); in dohist1() 154 hp = hp->Hnext; in dohist1() [all …]
|
/illumos-gate/usr/src/cmd/tcpd/ |
H A D | scaffold.c | 44 static struct hostent *dup_hostent(hp) in dup_hostent() argument 45 struct hostent *hp; in dup_hostent() 65 hb->host.h_addrtype = hp->h_addrtype;; 66 hb->host.h_length = hp->h_length; 84 struct hostent *hp; local 115 if (STR_NE(host, hp->h_name)) { 119 return (dup_hostent(hp)); 129 struct hostent *hp; local 133 if ((hp = find_inet_addr(host)) == 0) 138 sin.sg_family = hp->h_addrtype; [all …]
|