Print this page
8527 tty buffer/queue sizes should be larger


 363         WR(rqp)->q_ptr = rqp->q_ptr = ptmp;
 364 
 365         qprocson(rqp);
 366 
 367         /* Allow slave to send messages to master */
 368         PT_ENTER_WRITE(ptmp);
 369         ptmp->ptm_rdq = rqp;
 370         PT_EXIT_WRITE(ptmp);
 371 
 372         /*
 373          * set up hi/lo water marks on stream head read queue
 374          * and add controlling tty if not set
 375          */
 376         mop->b_datap->db_type = M_SETOPTS;
 377         mop->b_wptr += sizeof (struct stroptions);
 378         sop = (struct stroptions *)mop->b_rptr;
 379         if (oflag & FNOCTTY)
 380                 sop->so_flags = SO_HIWAT | SO_LOWAT;
 381         else
 382                 sop->so_flags = SO_HIWAT | SO_LOWAT | SO_ISTTY;
 383         sop->so_hiwat = 512;
 384         sop->so_lowat = 256;
 385         putnext(rqp, mop);
 386 
 387         /*
 388          * The input, devp, is a major device number, the output is put
 389          * into the same parm as a major,minor pair.
 390          */
 391         *devp = makedevice(getmajor(*devp), dminor);
 392 
 393         return (0);
 394 }
 395 
 396 
 397 /*
 398  * Find the address to private data identifying the slave's write queue.
 399  * Send a hang-up message up the slave's read queue to designate the
 400  * master/slave pair is tearing down. Uattach the master and slave by
 401  * nulling out the write queue fields in the private data structure.
 402  * Finally, unlock the master/slave pair and mark the master as closed.
 403  */




 363         WR(rqp)->q_ptr = rqp->q_ptr = ptmp;
 364 
 365         qprocson(rqp);
 366 
 367         /* Allow slave to send messages to master */
 368         PT_ENTER_WRITE(ptmp);
 369         ptmp->ptm_rdq = rqp;
 370         PT_EXIT_WRITE(ptmp);
 371 
 372         /*
 373          * set up hi/lo water marks on stream head read queue
 374          * and add controlling tty if not set
 375          */
 376         mop->b_datap->db_type = M_SETOPTS;
 377         mop->b_wptr += sizeof (struct stroptions);
 378         sop = (struct stroptions *)mop->b_rptr;
 379         if (oflag & FNOCTTY)
 380                 sop->so_flags = SO_HIWAT | SO_LOWAT;
 381         else
 382                 sop->so_flags = SO_HIWAT | SO_LOWAT | SO_ISTTY;
 383         sop->so_hiwat = _TTY_BUFSIZ;
 384         sop->so_lowat = 256;
 385         putnext(rqp, mop);
 386 
 387         /*
 388          * The input, devp, is a major device number, the output is put
 389          * into the same parm as a major,minor pair.
 390          */
 391         *devp = makedevice(getmajor(*devp), dminor);
 392 
 393         return (0);
 394 }
 395 
 396 
 397 /*
 398  * Find the address to private data identifying the slave's write queue.
 399  * Send a hang-up message up the slave's read queue to designate the
 400  * master/slave pair is tearing down. Uattach the master and slave by
 401  * nulling out the write queue fields in the private data structure.
 402  * Finally, unlock the master/slave pair and mark the master as closed.
 403  */