Lines Matching refs:async

418 	struct asyncline *async;  in xenconsopen()  local
426 async = xcp->priv; in xenconsopen()
431 if ((async->async_flags & ASYNC_ISOPEN) == 0) { in xenconsopen()
432 async->async_ttycommon.t_iflag = 0; in xenconsopen()
433 async->async_ttycommon.t_iocpending = NULL; in xenconsopen()
434 async->async_ttycommon.t_size.ws_row = 0; in xenconsopen()
435 async->async_ttycommon.t_size.ws_col = 0; in xenconsopen()
436 async->async_ttycommon.t_size.ws_xpixel = 0; in xenconsopen()
437 async->async_ttycommon.t_size.ws_ypixel = 0; in xenconsopen()
438 async->async_dev = *dev; in xenconsopen()
439 async->async_wbufcid = 0; in xenconsopen()
441 async->async_startc = CSTART; in xenconsopen()
442 async->async_stopc = CSTOP; in xenconsopen()
443 } else if ((async->async_ttycommon.t_flags & TS_XCLUDE) && in xenconsopen()
449 async->async_ttycommon.t_flags |= TS_SOFTCAR; in xenconsopen()
451 async->async_ttycommon.t_readq = rq; in xenconsopen()
452 async->async_ttycommon.t_writeq = WR(rq); in xenconsopen()
453 rq->q_ptr = WR(rq)->q_ptr = (caddr_t)async; in xenconsopen()
461 async->async_flags |= ASYNC_ISOPEN; in xenconsopen()
474 struct asyncline *async; in xenconsclose() local
480 async = (struct asyncline *)q->q_ptr; in xenconsclose()
481 ASSERT(async != NULL); in xenconsclose()
482 xcp = async->async_common; in xenconsclose()
489 async->async_flags |= ASYNC_CLOSING; in xenconsclose()
491 async->async_ocnt = 0; in xenconsclose()
492 if (async->async_xmitblk != NULL) in xenconsclose()
493 freeb(async->async_xmitblk); in xenconsclose()
494 async->async_xmitblk = NULL; in xenconsclose()
497 ttycommon_close(&async->async_ttycommon); in xenconsclose()
502 if (async->async_wbufcid != 0) { in xenconsclose()
503 unbufcall(async->async_wbufcid); in xenconsclose()
504 async->async_wbufcid = 0; in xenconsclose()
510 async->async_ttycommon.t_readq = NULL; in xenconsclose()
511 async->async_ttycommon.t_writeq = NULL; in xenconsclose()
516 async->async_flags = 0; in xenconsclose()
517 cv_broadcast(&async->async_flags_cv); in xenconsclose()
534 struct asyncline *async; in xencons_rxint() local
556 async = xcp->priv; in xencons_rxint()
559 tp = &async->async_ttycommon; in xencons_rxint()
562 if (async->async_flags & ASYNC_OUT_FLW_RESUME) { in xencons_rxint()
563 xcasync_start(async); in xencons_rxint()
564 async->async_flags &= ~ASYNC_OUT_FLW_RESUME; in xencons_rxint()
571 if (!(async->async_flags & ASYNC_ISOPEN)) { in xencons_rxint()
627 if (!(async->async_inflow_source & IN_FLOW_STREAMS)) { in xencons_rxint()
634 if (async->async_inflow_source & IN_FLOW_STREAMS) { in xencons_rxint()
642 ttycommon_qfull(&async->async_ttycommon, q); in xencons_rxint()
653 if ((c == async->async_stopc) && in xencons_rxint()
657 } else if ((c == async->async_startc) && in xencons_rxint()
663 (async->async_flags & ASYNC_SW_OUT_FLW)) { in xencons_rxint()
698 struct asyncline *async; in xencons_txint() local
716 async = xcp->priv; in xencons_txint()
717 if ((async->async_flags & ASYNC_ISOPEN) != 0) in xencons_txint()
718 xcasync_start(async); in xencons_txint()
761 xcasync_start(struct asyncline *async) in xcasync_start() argument
763 struct xencons *xcp = async->async_common; in xcasync_start()
783 if ((q = async->async_ttycommon.t_writeq) == NULL) { in xcasync_start()
806 xcasync_ioctl(async, q, bp); in xcasync_start()
824 if (async->async_flags & (ASYNC_SW_OUT_FLW | ASYNC_STOPPED)) { in xcasync_start()
891 xcasync_ioctl(struct asyncline *async, queue_t *wq, mblk_t *mp) in xcasync_ioctl() argument
893 struct xencons *xcp = async->async_common; in xcasync_ioctl()
894 tty_common_t *tp = &async->async_ttycommon; in xcasync_ioctl()
912 freemsg(async->async_ttycommon.t_iocpending); in xcasync_ioctl()
913 async->async_ttycommon.t_iocpending = NULL; in xcasync_ioctl()
959 if (async->async_wbufcid) in xcasync_ioctl()
960 unbufcall(async->async_wbufcid); in xcasync_ioctl()
961 async->async_wbufcid = bufcall(datasize, BPRI_HI, in xcasync_ioctl()
963 (void *)(intptr_t)async->async_common->unit); in xcasync_ioctl()
1094 struct asyncline *async; in xenconswput() local
1097 async = (struct asyncline *)q->q_ptr; in xenconswput()
1098 xcp = async->async_common; in xenconswput()
1104 async->async_flags |= ASYNC_STOPPED; in xenconswput()
1111 if (async->async_flags & ASYNC_STOPPED) { in xenconswput()
1112 async->async_flags &= ~ASYNC_STOPPED; in xenconswput()
1113 xcasync_start(async); in xenconswput()
1136 xcasync_start(async); in xenconswput()
1144 xcasync_ioctl(async, q, mp); in xenconswput()
1156 if (async->async_xmitblk != NULL) { in xenconswput()
1157 freeb(async->async_xmitblk); in xenconswput()
1158 async->async_xmitblk = NULL; in xenconswput()
1175 xcasync_start(async); in xenconswput()
1188 xcasync_start(async); in xenconswput()
1195 if (!(async->async_inflow_source & IN_FLOW_USER)) { in xenconswput()
1207 if (async->async_inflow_source & IN_FLOW_USER) { in xenconswput()
1241 struct asyncline *async; in xcasync_reioctl() local
1248 async = xcp->priv; in xcasync_reioctl()
1254 async->async_wbufcid = 0; in xcasync_reioctl()
1255 if ((q = async->async_ttycommon.t_writeq) == NULL) { in xcasync_reioctl()
1259 if ((mp = async->async_ttycommon.t_iocpending) != NULL) { in xcasync_reioctl()
1261 async->async_ttycommon.t_iocpending = NULL; in xcasync_reioctl()
1263 xcasync_ioctl(async, q, mp); in xcasync_reioctl()
1432 struct asyncline *async = xcp->priv; in xcasync_flowcontrol_sw_output() local
1437 if (!(async->async_ttycommon.t_iflag & IXON)) in xcasync_flowcontrol_sw_output()
1442 async->async_flags |= ASYNC_SW_OUT_FLW; in xcasync_flowcontrol_sw_output()
1443 async->async_flags &= ~ASYNC_OUT_FLW_RESUME; in xcasync_flowcontrol_sw_output()
1448 async->async_flags &= ~ASYNC_SW_OUT_FLW; in xcasync_flowcontrol_sw_output()
1449 async->async_flags |= ASYNC_OUT_FLW_RESUME; in xcasync_flowcontrol_sw_output()
1478 struct asyncline *async = xcp->priv; in xcasync_flowcontrol_sw_input() local
1484 if (!(async->async_ttycommon.t_iflag & IXOFF)) in xcasync_flowcontrol_sw_input()
1492 async->async_inflow_source |= type; in xcasync_flowcontrol_sw_input()
1501 if (async->async_inflow_source & (IN_FLOW_STREAMS | in xcasync_flowcontrol_sw_input()
1503 async->async_flags |= ASYNC_SW_IN_FLOW | in xcasync_flowcontrol_sw_input()
1506 "type = %x\n", instance, async->async_inflow_source); in xcasync_flowcontrol_sw_input()
1509 async->async_inflow_source &= ~type; in xcasync_flowcontrol_sw_input()
1510 if (async->async_inflow_source == 0) { in xcasync_flowcontrol_sw_input()
1511 async->async_flags = (async->async_flags & in xcasync_flowcontrol_sw_input()
1521 if (async->async_flags & ASYNC_SW_IN_NEEDED) { in xcasync_flowcontrol_sw_input()
1529 c = (async->async_flags & ASYNC_SW_IN_FLOW) ? in xcasync_flowcontrol_sw_input()
1530 async->async_stopc : async->async_startc; in xcasync_flowcontrol_sw_input()
1533 async->async_flags &= ~ASYNC_SW_IN_NEEDED; in xcasync_flowcontrol_sw_input()