/illumos-gate/usr/src/uts/common/os/ |
H A D | streamio.c | 93 #define i_straccess(x, y) ((stp->sd_sidp == NULL) ? 0 : \ 94 (stp->sd_vnode->v_type == VFIFO) ? 0 : \ 197 push_mod(queue_t *qp, dev_t *devp, struct stdata *stp, const char *name, in push_mod() argument 203 if (stp->sd_flag & (STRHUP|STRDERR|STWRERR)) { in push_mod() 204 error = (stp->sd_flag & STRHUP) ? ENXIO : EIO; in push_mod() 207 if (stp->sd_pushcnt >= nstrpush) { in push_mod() 212 stp->sd_flag |= STREOPENFAIL; in push_mod() 226 mutex_enter(&stp->sd_lock); in push_mod() 227 if (anchor == stp->sd_pushcnt) { in push_mod() 228 stp->sd_anchor = stp->sd_pushcnt; in push_mod() [all …]
|
H A D | strsubr.c | 630 #define STR_SERVICE(stp, q) { \ argument 631 ASSERT(MUTEX_HELD(&stp->sd_qlock)); \ 632 while (stp->sd_qhead != NULL) { \ 633 DQ(q, stp->sd_qhead, stp->sd_qtail, q_link); \ 634 ASSERT(stp->sd_nqueues > 0); \ 635 stp->sd_nqueues--; \ 637 mutex_exit(&stp->sd_qlock); \ 639 mutex_enter(&stp->sd_qlock); \ 641 ASSERT(stp->sd_nqueues == 0); \ 642 ASSERT((stp->sd_qhead == NULL) && (stp->sd_qtail == NULL)); \ [all …]
|
H A D | session.c | 246 sess_ctty_clear(sess_t *sp, stdata_t *stp) in sess_ctty_clear() argument 254 ASSERT(MUTEX_HELD(&stp->sd_lock) && MUTEX_HELD(&pidlock) && in sess_ctty_clear() 264 stp->sd_pgidp = NULL; in sess_ctty_clear() 265 stp->sd_sidp = NULL; in sess_ctty_clear() 269 sess_ctty_set(proc_t *p, sess_t *sp, stdata_t *stp) in sess_ctty_set() argument 274 ASSERT(MUTEX_HELD(&stp->sd_lock) && MUTEX_HELD(&pidlock) && in sess_ctty_set() 285 sp->s_vp = makectty(stp->sd_vnode); in sess_ctty_set() 290 stp->sd_flag |= STRISTTY; /* just to be sure */ in sess_ctty_set() 291 stp->sd_sidp = sp->s_sidp; in sess_ctty_set() 292 stp->sd_pgidp = sp->s_sidp; in sess_ctty_set() [all …]
|
H A D | ddi.c | 495 struct stdata *stp = STREAM(q); in canputnext() local 501 if (stp->sd_ciputctrl != NULL) { in canputnext() 502 int ix = CPU->cpu_seqid & stp->sd_nciputctrl; in canputnext() 503 sdlock = &stp->sd_ciputctrl[ix].ciputctrl_lock; in canputnext() 506 mutex_enter(sdlock = &stp->sd_reflock); in canputnext() 522 if (sdlock != &stp->sd_reflock) { in canputnext() 524 mutex_enter(&stp->sd_reflock); in canputnext() 528 stp->sd_refcnt++; in canputnext() 529 ASSERT(stp->sd_refcnt != 0); /* Wraparound */ in canputnext() 530 mutex_exit(&stp->sd_reflock); in canputnext() [all …]
|
/illumos-gate/usr/src/cmd/sgs/common/ |
H A D | string_table.c | 159 Str_tbl *stp; in st_new() local 161 if ((stp = calloc(1, sizeof (*stp))) == NULL) in st_new() 167 stp->st_strsize = stp->st_fullstrsize = stp->st_nextoff = 1; in st_new() 172 stp->st_flags = flags; in st_new() 173 if ((stp->st_flags & FLG_STTAB_COMPRESS) == 0) in st_new() 174 return (stp); in st_new() 176 if ((stp->st_lentree = calloc(1, sizeof (*stp->st_lentree))) == NULL) in st_new() 179 avl_create(stp->st_lentree, &avl_len_compare, sizeof (LenNode), in st_new() 182 return (stp); in st_new() 196 st_insert(Str_tbl *stp, const char *str) in st_insert() argument [all …]
|
/illumos-gate/usr/src/uts/common/io/sfxge/ |
H A D | sfxge_tx.c | 130 sfxge_tx_dpl_get_pkt_max(sfxge_txq_t *stp) in sfxge_tx_dpl_get_pkt_max() argument 132 sfxge_tx_dpl_t *stdp = &(stp->st_dpl); in sfxge_tx_dpl_get_pkt_max() 253 sfxge_txq_t *stp = buf; in sfxge_tx_qctor() local 254 efsys_mem_t *esmp = &(stp->st_mem); in sfxge_tx_qctor() 261 EFX_STATIC_ASSERT(sizeof (stp->__st_u1.__st_s1) <= in sfxge_tx_qctor() 262 sizeof (stp->__st_u1.__st_pad)); in sfxge_tx_qctor() 263 EFX_STATIC_ASSERT(sizeof (stp->__st_u2.__st_s2) <= in sfxge_tx_qctor() 264 sizeof (stp->__st_u2.__st_pad)); in sfxge_tx_qctor() 265 EFX_STATIC_ASSERT(sizeof (stp->__st_u3.__st_s3) <= in sfxge_tx_qctor() 266 sizeof (stp->__st_u3.__st_pad)); in sfxge_tx_qctor() [all …]
|
H A D | sfxge_ev.c | 209 sfxge_txq_t *stp; in sfxge_ev_qcomplete() local 211 if ((stp = sep->se_stp) != NULL) { in sfxge_ev_qcomplete() 218 next = stp->st_next; in sfxge_ev_qcomplete() 219 stp->st_next = NULL; in sfxge_ev_qcomplete() 221 ASSERT3U(stp->st_evq, ==, index); in sfxge_ev_qcomplete() 223 if (stp->st_pending != stp->st_completed) in sfxge_ev_qcomplete() 224 sfxge_tx_qcomplete(stp); in sfxge_ev_qcomplete() 226 stp = next; in sfxge_ev_qcomplete() 227 } while (stp != NULL); in sfxge_ev_qcomplete() 432 sfxge_txq_t *stp; in sfxge_ev_tx() local [all …]
|
/illumos-gate/usr/src/common/smbios/ |
H A D | smb_info.c | 237 smb_info_strptr(const smb_struct_t *stp, uint8_t off, int *n) in smb_info_strptr() argument 239 const uint8_t *sp = (const uint8_t *)(uintptr_t)stp->smbst_hdr; in smb_info_strptr() 241 if (off != 0 && sp + off < stp->smbst_end) { in smb_info_strptr() 243 return (smb_strptr(stp, sp[off])); in smb_info_strptr() 246 return (smb_strptr(stp, 0)); in smb_info_strptr() 292 const smb_struct_t *stp = smb_lookup_id(shp, id); in smbios_info_common() local 296 if (stp == NULL) in smbios_info_common() 300 if (isp->is_type == stp->smbst_hdr->smbh_type) in smbios_info_common() 304 ip->smbi_manufacturer = smb_info_strptr(stp, isp->is_manu, &n); in smbios_info_common() 305 ip->smbi_product = smb_info_strptr(stp, isp->is_product, &n); in smbios_info_common() [all …]
|
H A D | smb_open.c | 287 smb_struct_t *stp = &shp->sh_structs[i]; in smbios_bufopen() local 322 stp->smbst_hdr = hp; in smbios_bufopen() 323 stp->smbst_str = s; in smbios_bufopen() 324 stp->smbst_end = p; in smbios_bufopen() 325 stp->smbst_next = shp->sh_hash[h]; in smbios_bufopen() 326 stp->smbst_strtab = smb_alloc(sizeof (uint16_t) * n); in smbios_bufopen() 327 stp->smbst_strtablen = n; in smbios_bufopen() 329 if (n != 0 && stp->smbst_strtab == NULL) in smbios_bufopen() 332 shp->sh_hash[h] = stp; in smbios_bufopen() 336 for (n = 0, p = s; n < stp->smbst_strtablen; p++) { in smbios_bufopen() [all …]
|
/illumos-gate/usr/src/uts/common/sys/scsi/targets/ |
H A D | sgendef.h | 101 #define SGEN_SET_OPEN(stp) \ argument 102 (((sgen_state_t *)(stp))->sgen_flags |= SGEN_FL_OPEN) 103 #define SGEN_CLR_OPEN(stp) \ argument 104 (((sgen_state_t *)(stp))->sgen_flags &= ~SGEN_FL_OPEN) 105 #define SGEN_IS_OPEN(stp) \ argument 106 ((((sgen_state_t *)(stp))->sgen_flags & SGEN_FL_OPEN) == SGEN_FL_OPEN) 108 #define SGEN_SET_SUSP(stp) \ argument 109 (((sgen_state_t *)(stp))->sgen_flags |= SGEN_FL_SUSP) 110 #define SGEN_CLR_SUSP(stp) \ argument 111 (((sgen_state_t *)(stp))->sgen_flags &= ~SGEN_FL_SUSP) [all …]
|
/illumos-gate/usr/src/cmd/fm/modules/common/sensor-transport/ |
H A D | sensor_transport.c | 82 sensor_transport_t *stp = arg; in st_check_component() local 83 fmd_hdl_t *hdl = stp->st_hdl; in st_check_component() 123 TOPO_METH_SENSOR_FAILURE_VERSION, stp->st_spoofs, &nvl, &err) != in st_check_component() 209 for (current = &stp->st_faults; *current != NULL; in st_check_component() 227 if (stp->st_first || faulted) { in st_check_component() 231 sfp->sf_next = stp->st_faults; in st_check_component() 232 stp->st_faults = sfp; in st_check_component() 253 (sfp->sf_num_fails > stp->st_tolerance)) { in st_check_component() 274 fmd_xprt_post(hdl, stp->st_xprt, event, 0); in st_check_component() 295 sensor_transport_t *stp; in st_timeout() local [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/telnet/ |
H A D | enc_des.c | 113 ecb_encrypt(struct stinfo *stp, Block in, Block out) in ecb_encrypt() argument 127 code = krb5_c_encrypt(telnet_context, &stp->str_key, 0, NULL, in ecb_encrypt() 459 cfb64_stream_iv(Block seed, register struct stinfo *stp) in cfb64_stream_iv() argument 461 (void) memcpy((void *)stp->str_iv, (void *)seed, sizeof (Block)); in cfb64_stream_iv() 462 (void) memcpy((void *)stp->str_output, (void *)seed, sizeof (Block)); in cfb64_stream_iv() 464 stp->str_index = sizeof (Block); in cfb64_stream_iv() 468 cfb64_stream_key(Block key, register struct stinfo *stp) in cfb64_stream_key() argument 470 (void) memcpy((void *)stp->str_keybytes, (void *)key, sizeof (Block)); in cfb64_stream_key() 471 stp->str_key.length = DES_BLOCKSIZE; in cfb64_stream_key() 472 stp->str_key.contents = stp->str_keybytes; in cfb64_stream_key() [all …]
|
/illumos-gate/usr/src/lib/libdtrace/common/ |
H A D | dt_program.c | 65 dt_stmt_t *stp, *next; in dt_program_destroy() local 68 for (stp = dt_list_next(&pgp->dp_stmts); stp != NULL; stp = next) { in dt_program_destroy() 69 next = dt_list_next(stp); in dt_program_destroy() 70 dtrace_stmt_destroy(dtp, stp->ds_desc); in dt_program_destroy() 71 dt_free(dtp, stp); in dt_program_destroy() 87 dt_stmt_t *stp; in dtrace_program_info() local 104 for (stp = dt_list_next(&pgp->dp_stmts); stp; stp = dt_list_next(stp)) { in dtrace_program_info() 105 dtrace_ecbdesc_t *edp = stp->ds_desc->dtsd_ecbdesc; in dtrace_program_info() 112 dt_attr_min(stp->ds_desc->dtsd_descattr, pip->dpi_descattr); in dtrace_program_info() 115 dt_attr_min(stp->ds_desc->dtsd_stmtattr, pip->dpi_stmtattr); in dtrace_program_info() [all …]
|
/illumos-gate/usr/src/stand/lib/fs/nfs/ |
H A D | nfsops.c | 72 static int boot_nfs_fstat(int fd, struct bootstat *stp); 369 boot_nfs_fstat(int fd, struct bootstat *stp) in boot_nfs_fstat() argument 377 printf("boot_nfs_fstat(%d, 0x%x)\n", fd, stp); in boot_nfs_fstat() 416 stp->st_size = (off_t)va.va_size; in boot_nfs_fstat() 417 stp->st_mode = VTTOIF(va.va_type) | va.va_mode; in boot_nfs_fstat() 418 stp->st_atim.tv_sec = va.va_atime.tv_sec; in boot_nfs_fstat() 419 stp->st_atim.tv_nsec = va.va_atime.tv_nsec; in boot_nfs_fstat() 420 stp->st_ctim.tv_sec = va.va_ctime.tv_sec; in boot_nfs_fstat() 421 stp->st_ctim.tv_nsec = va.va_ctime.tv_nsec; in boot_nfs_fstat() 422 stp->st_mtim.tv_sec = va.va_mtime.tv_sec; in boot_nfs_fstat() [all …]
|
/illumos-gate/usr/src/tools/sgs/sgsmsg/ |
H A D | sgsmsg.c | 107 static Str_tbl *stp; /* string table */ variable 154 if ((stp == 0) && ((stp = st_new(FLG_STNEW_COMPRESS)) == NULL)) { in message_append() 169 if (st_insert(stp, msg->ms_message) == -1) { in message_append() 316 dump_stringtab(Str_tbl *stp) in dump_stringtab() argument 320 if ((stp->st_flags & FLG_STTAB_COMPRESS) == 0) { in dump_stringtab() 322 stp->st_fullstrsize); in dump_stringtab() 327 stp->st_fullstrsize, stp->st_strsize); in dump_stringtab() 329 stp->st_hbckcnt); in dump_stringtab() 331 for (cnt = 0; cnt < stp->st_hbckcnt; cnt++) { in dump_stringtab() 332 Str_hash *sthash = stp->st_hashbcks[cnt]; in dump_stringtab() [all …]
|
/illumos-gate/usr/src/lib/fm/topo/modules/common/ses/ |
H A D | ses.c | 425 ses_ssl_alloc(topo_mod_t *mod, ses_enum_target_t *stp) in ses_ssl_alloc() argument 431 topo_mod_dprintf(mod, "ssl_alloc %p", stp); in ses_ssl_alloc() 432 ssl->ssl_tgt = stp; in ses_ssl_alloc() 439 ses_ssl_free(topo_mod_t *mod, ses_enum_target_t *stp) in ses_ssl_free() argument 446 if (ssl->ssl_tgt == stp) { in ses_ssl_free() 461 ses_ssl_valid(ses_enum_target_t *stp) in ses_ssl_valid() argument 466 if (ssl->ssl_tgt == stp) in ses_ssl_valid() 516 ses_enum_target_t *stp; in ses_contract_thread() local 575 stp = (ses_enum_target_t *)(uintptr_t) in ses_contract_thread() 581 if (ses_ssl_valid(stp) == 0) { in ses_contract_thread() [all …]
|
/illumos-gate/usr/src/cmd/truss/ |
H A D | systable.c | 1093 const struct systable *stp = NULL; in subsys() local 1099 stp = &faccessattable[subcode]; in subsys() 1103 stp = &fchmodattable[subcode]; in subsys() 1107 stp = &fchownattable[subcode]; in subsys() 1111 stp = &mkdiratattable[subcode]; in subsys() 1115 stp = &mknodatattable[subcode]; in subsys() 1119 stp = &renameattable[subcode]; in subsys() 1123 stp = &linkattable[subcode]; in subsys() 1127 stp = &unlinkattable[subcode]; in subsys() 1131 stp = &symlinkattable[subcode]; in subsys() [all …]
|
H A D | actions.c | 362 const struct systable *stp; in sysentry() local 384 stp = subsys(what, subcode); in sysentry() 386 if (nargs > stp->nargs) in sysentry() 387 nargs = stp->nargs; in sysentry() 395 if ((nargs > 0 && stp->arg[0] == STG) || in sysentry() 432 } else if (stp->arg[0] == STG) { in sysentry() 479 x = stp->arg[i]; in sysentry() 517 const struct systable *stp; in sysexit() local 582 stp = subsys(what, subcode); in sysexit() 733 switch (stp->rval[0]) { in sysexit() [all …]
|
/illumos-gate/usr/src/lib/libsqlite/tool/ |
H A D | lemon.c | 174 struct state *stp; /* Pointer to state which contains this */ member 197 struct state *stp; /* The new state, if a shift */ member 386 new->x.stp = (struct state *)arg; 724 struct state *stp; local 732 stp = State_find(bp); 733 if( stp ){ 738 for(x=bp, y=stp->bp; x && y; x=x->bp, y=y->bp){ 750 stp = State_new(); /* A new state structure */ 751 MemoryCheck(stp); 752 stp->bp = bp; /* Remember the configuration basis */ [all …]
|
/illumos-gate/usr/src/cmd/ndmpd/ndmp/ |
H A D | ndmpd_fhistory.c | 733 ndmpd_fhpath_v3_cb(lbr_fhlog_call_backs_t *cbp, char *path, struct stat64 *stp, in ndmpd_fhpath_v3_cb() argument 775 fh_cookie, p, stp, off)) < 0) in ndmpd_fhpath_v3_cb() 790 ndmpd_fhdir_v3_cb(lbr_fhlog_call_backs_t *cbp, char *dir, struct stat64 *stp) in ndmpd_fhdir_v3_cb() argument 830 if (stp->st_ino == nlp->nlp_bkdirino) in ndmpd_fhdir_v3_cb() 833 pino = stp->st_ino; in ndmpd_fhdir_v3_cb() 842 !dbm_getone(nlp->nlp_bkmap, (u_longlong_t)stp->st_ino)) { in ndmpd_fhdir_v3_cb() 940 struct stat64 *stp, u_longlong_t off) in ndmpd_fhnode_v3_cb() argument 959 } else if (!stp) { in ndmpd_fhnode_v3_cb() 978 if (stp->st_ino == nlp->nlp_bkdirino) { in ndmpd_fhnode_v3_cb() 981 "bkroot %d -> %d", stp->st_ino, ROOT_INODE); in ndmpd_fhnode_v3_cb() [all …]
|
/illumos-gate/usr/src/lib/scsi/libses/common/ |
H A D | ses_enclosure.c | 206 ses_open_scsi(uint_t version, libscsi_target_t *stp) in ses_open_scsi() argument 219 tp->st_target = stp; in ses_open_scsi() 220 tp->st_scsi_hdl = libscsi_get_handle(stp); in ses_open_scsi() 247 libscsi_target_t *stp; in ses_open() local 256 if ((stp = libscsi_open(hp, NULL, target)) == NULL) { in ses_open() 262 if ((tp = ses_open_scsi(version, stp)) == NULL) { in ses_open() 263 libscsi_close(hp, stp); in ses_open()
|
/illumos-gate/usr/src/lib/libslp/clib/ |
H A D | slp_targets.c | 354 struct scope_targets *sts, *stp; in slp_destroy_target_list() local 355 for (sts = tl->scopes[i]; sts; sts = stp) { in slp_destroy_target_list() 356 stp = sts->next; in slp_destroy_target_list() 390 struct scope_targets *st, *stp; in add2scopes_list() local 400 for (stp = scopes[i]; stp && stp->next; ) { in add2scopes_list() 401 stp = stp->next; in add2scopes_list() 403 if (stp) in add2scopes_list() 404 stp->next = st; in add2scopes_list()
|
/illumos-gate/usr/src/cmd/sgs/liblddbg/common/ |
H A D | sections.c | 95 Dbg_sec_strtab(Lm_list *lml, Os_desc *osp, Str_tbl *stp) in Dbg_sec_strtab() argument 106 if (stp->st_flags & FLG_STTAB_COMPRESS) in Dbg_sec_strtab() 108 EC_XWORD(stp->st_fullstrsize), EC_XWORD(stp->st_strsize)); in Dbg_sec_strtab() 111 EC_XWORD(stp->st_fullstrsize)); in Dbg_sec_strtab() 114 ((stp->st_flags & FLG_STTAB_COMPRESS) == 0)) in Dbg_sec_strtab() 119 stp->st_hbckcnt); in Dbg_sec_strtab() 121 for (cnt = 0; cnt < stp->st_hbckcnt; cnt++) { in Dbg_sec_strtab() 122 Str_hash *strhash = stp->st_hashbcks[cnt]; in Dbg_sec_strtab()
|
/illumos-gate/usr/src/uts/sun4u/serengeti/io/ |
H A D | sbdp_mbox.c | 80 sbdp_showbd_2_sbd_stat(show_board_t *shbp, sbd_stat_t *stp, int board) in sbdp_showbd_2_sbd_stat() argument 86 stp->s_board = board; in sbdp_showbd_2_sbd_stat() 87 (void) strcpy(stp->s_info, shbp->s_info); in sbdp_showbd_2_sbd_stat() 88 stp->s_power = shbp->s_power; in sbdp_showbd_2_sbd_stat() 90 (void) strcpy(stp->s_type, shbp->s_type); in sbdp_showbd_2_sbd_stat() 98 (void) strcpy(stp->s_type, UNKNOWN); in sbdp_showbd_2_sbd_stat() 99 stp->s_rstate = SBD_STAT_EMPTY; in sbdp_showbd_2_sbd_stat() 101 stp->s_rstate = SBD_STAT_DISCONNECTED; in sbdp_showbd_2_sbd_stat() 103 stp->s_rstate = SBD_STAT_CONNECTED; in sbdp_showbd_2_sbd_stat() 106 stp->s_assigned = shbp->s_assigned; in sbdp_showbd_2_sbd_stat() [all …]
|
/illumos-gate/usr/src/uts/common/sys/ |
H A D | strsubr.h | 270 #define STREAM_NEEDSERVICE(stp) ((stp)->sd_qhead != NULL) argument 836 #define STREAM_PUTLOCKS_ENTER(stp) { \ argument 837 ASSERT(MUTEX_HELD(&(stp)->sd_lock)); \ 838 if ((stp)->sd_ciputctrl != NULL) { \ 840 int nlocks = (stp)->sd_nciputctrl; \ 841 ciputctrl_t *cip = (stp)->sd_ciputctrl; \ 848 #define STREAM_PUTLOCKS_EXIT(stp) { \ argument 849 ASSERT(MUTEX_HELD(&(stp)->sd_lock)); \ 850 if ((stp)->sd_ciputctrl != NULL) { \ 852 int nlocks = (stp)->sd_nciputctrl; \ [all …]
|