taglinefilesource code
tty61drivers/char/console.cint paste_selection(struct tty_struct *tty);
tty666drivers/char/console.cstatic void respond_string(char * p, int currcons, struct tty_struct * tty)
tty669drivers/char/console.cput_tty_queue(*p, &tty->read_q);
tty672drivers/char/console.cTTY_READ_FLUSH(tty);
tty675drivers/char/console.cstatic void respond_num(unsigned int n, int currcons, struct tty_struct * tty)
tty685drivers/char/console.cput_tty_queue(buff[i], &tty->read_q);
tty690drivers/char/console.cstatic void cursor_report(int currcons, struct tty_struct * tty)
tty692drivers/char/console.cput_tty_queue('\033', &tty->read_q);
tty693drivers/char/console.cput_tty_queue('[', &tty->read_q);
tty694drivers/char/console.crespond_num(y + (decom ? top+1 : 1), currcons, tty);
tty695drivers/char/console.cput_tty_queue(';', &tty->read_q);
tty696drivers/char/console.crespond_num(x+1, currcons, tty);
tty697drivers/char/console.cput_tty_queue('R', &tty->read_q);
tty698drivers/char/console.cTTY_READ_FLUSH(tty);
tty701drivers/char/console.cstatic inline void status_report(int currcons, struct tty_struct * tty)
tty703drivers/char/console.crespond_string("\033[0n", currcons, tty);  /* Terminal ok */
tty706drivers/char/console.cstatic inline void respond_ID(int currcons, struct tty_struct * tty)
tty708drivers/char/console.crespond_string(VT102ID, currcons, tty);
tty960drivers/char/console.cvoid con_write(struct tty_struct * tty)
tty965drivers/char/console.cwake_up_interruptible(&tty->write_q.proc_list);
tty966drivers/char/console.ccurrcons = tty->line - 1;
tty974drivers/char/console.cif (!EMPTY(&tty->write_q) && currcons == sel_cons)
tty978drivers/char/console.cwhile (!tty->stopped &&  (c = get_tty_queue(&tty->write_q)) >= 0) {
tty1066drivers/char/console.crespond_ID(currcons,tty);
tty1127drivers/char/console.cstatus_report(currcons,tty);
tty1129drivers/char/console.ccursor_report(currcons,tty);
tty1191drivers/char/console.crespond_ID(currcons,tty);
tty1548drivers/char/console.cint con_open(struct tty_struct *tty, struct file * filp)
tty1550drivers/char/console.ctty->write = con_write;
tty1551drivers/char/console.ctty->ioctl = vt_ioctl;
tty1552drivers/char/console.cif (tty->line > NR_CONSOLES)
tty1731drivers/char/console.cint paste_selection(struct tty_struct *tty)
tty1740drivers/char/console.cput_tty_queue(*bp, &tty->read_q);
tty1743drivers/char/console.cTTY_READ_FLUSH(tty);
tty80drivers/char/keyboard.cstatic struct tty_struct * tty = NULL;
tty162drivers/char/keyboard.ctty = TTY_TABLE(0);
tty272drivers/char/keyboard.c(vc_kbd_flag(kbd,VC_REPEAT) && tty &&
tty273drivers/char/keyboard.c(L_ECHO(tty) || (EMPTY(&tty->secondary) && EMPTY(&tty->read_q)))))
tty287drivers/char/keyboard.cif (!tty)
tty289drivers/char/keyboard.cqp = &tty->read_q;
tty305drivers/char/keyboard.cif (!tty)
tty307drivers/char/keyboard.cqp = &tty->read_q;
tty368drivers/char/keyboard.cif (rep || !tty)
tty372drivers/char/keyboard.cput_queue(START_CHAR(tty));
tty375drivers/char/keyboard.cput_queue(STOP_CHAR(tty));
tty404drivers/char/keyboard.cif (tty)
tty405drivers/char/keyboard.cput_queue(INTR_CHAR(tty));
tty24drivers/char/pty.cstatic void pty_close(struct tty_struct * tty, struct file * filp)
tty26drivers/char/pty.cif (!tty)
tty28drivers/char/pty.cif (IS_A_PTY_MASTER(tty->line)) {
tty29drivers/char/pty.cif (tty->count > 1)
tty32drivers/char/pty.cif (tty->count > 2)
tty35drivers/char/pty.cwake_up_interruptible(&tty->secondary.proc_list);
tty36drivers/char/pty.cwake_up_interruptible(&tty->read_q.proc_list);
tty37drivers/char/pty.cwake_up_interruptible(&tty->write_q.proc_list);
tty38drivers/char/pty.cif (!tty->link)
tty40drivers/char/pty.cwake_up_interruptible(&tty->link->secondary.proc_list);
tty41drivers/char/pty.cwake_up_interruptible(&tty->link->read_q.proc_list);
tty42drivers/char/pty.cwake_up_interruptible(&tty->link->write_q.proc_list);
tty43drivers/char/pty.cif (IS_A_PTY_MASTER(tty->line)) {
tty44drivers/char/pty.ctty_hangup(tty->link);
tty45drivers/char/pty.cflush_input(tty);
tty46drivers/char/pty.cflush_output(tty);
tty80drivers/char/pty.cstatic void pty_write(struct tty_struct * tty)
tty82drivers/char/pty.cif (tty->link)
tty83drivers/char/pty.cpty_copy(tty,tty->link);
tty86drivers/char/pty.cint pty_open(struct tty_struct *tty, struct file * filp)
tty88drivers/char/pty.cif (!tty || !tty->link)
tty90drivers/char/pty.cif (IS_A_PTY_MASTER(tty->line))
tty91drivers/char/pty.cclear_bit(TTY_SLAVE_OPENED, &tty->flags);
tty93drivers/char/pty.cset_bit(TTY_SLAVE_OPENED, &tty->link->flags);
tty94drivers/char/pty.ctty->write = tty->link->write = pty_write;
tty95drivers/char/pty.ctty->close = tty->link->close = pty_close;
tty96drivers/char/pty.cwake_up_interruptible(&tty->read_q.proc_list);
tty99drivers/char/pty.cwhile (!tty->link->count && !(current->signal & ~current->blocked))
tty100drivers/char/pty.cinterruptible_sleep_on(&tty->link->read_q.proc_list);
tty101drivers/char/pty.cif (!tty->link->count)
tty205drivers/char/serial.cstatic void rs_throttle(struct tty_struct * tty, int status);
tty252drivers/char/serial.cstatic void rs_stop(struct tty_struct *tty)
tty256drivers/char/serial.cinfo = rs_table + DEV_TO_SL(tty->line);
tty264drivers/char/serial.cstatic void rs_start(struct tty_struct *tty)
tty268drivers/char/serial.cinfo = rs_table + DEV_TO_SL(tty->line);
tty333drivers/char/serial.cqueue = &info->tty->read_q;
tty345drivers/char/serial.cset_bit(head, &info->tty->readq_flags);
tty360drivers/char/serial.c&info->tty->flags)) 
tty361drivers/char/serial.crs_throttle(info->tty, TTY_THROTTLE_RQ_FULL);
tty373drivers/char/serial.cqueue = &info->tty->write_q;
tty396drivers/char/serial.cif (info->tty->write_data_cnt) {
tty397drivers/char/serial.cset_bit(info->tty->line, &tty_check_write);
tty413drivers/char/serial.cif ((status & UART_MSR_DDCD) && !C_LOCAL(info->tty)) {
tty423drivers/char/serial.cif (C_RTSCTS(info->tty)) {
tty424drivers/char/serial.cif (info->tty->stopped) {
tty429drivers/char/serial.cinfo->tty->stopped = 0;
tty430drivers/char/serial.crs_start(info->tty);
tty438drivers/char/serial.cinfo->tty->stopped = 1;
tty439drivers/char/serial.crs_stop(info->tty);
tty481drivers/char/serial.cif (info->tty &&
tty493drivers/char/serial.c!info->tty->stopped) {
tty547drivers/char/serial.cdo_SAK(info->tty);
tty549drivers/char/serial.cif (I_BRKINT(info->tty)) {
tty550drivers/char/serial.cflush_input(info->tty);
tty551drivers/char/serial.cflush_output(info->tty);
tty552drivers/char/serial.cif (info->tty->pgrp > 0)
tty553drivers/char/serial.ckill_pg(info->tty->pgrp, SIGINT,1);
tty573drivers/char/serial.cif (!info->tty)  
tty576drivers/char/serial.cTTY_READ_FLUSH(info->tty);
tty579drivers/char/serial.cwake_up_interruptible(&info->tty->write_q.proc_list);
tty582drivers/char/serial.ctty_hangup(info->tty);
tty795drivers/char/serial.cif (info->tty)
tty796drivers/char/serial.cclear_bit(TTY_IO_ERROR, &info->tty->flags);
tty800drivers/char/serial.cif (info->tty && info->tty->termios && I_INPCK(info->tty))
tty824drivers/char/serial.cif (info->tty && !(info->tty->termios->c_cflag & HUPCL))
tty832drivers/char/serial.cif (info->tty)
tty833drivers/char/serial.cset_bit(TTY_IO_ERROR, &info->tty->flags);
tty852drivers/char/serial.cif (!info->tty || !info->tty->termios)
tty854drivers/char/serial.ccflag = info->tty->termios->c_cflag;
tty930drivers/char/serial.cqueue = &info->tty->write_q;
tty949drivers/char/serial.cvoid rs_write(struct tty_struct * tty)
tty953drivers/char/serial.cif (!tty || tty->stopped)
tty955drivers/char/serial.cinfo = rs_table + DEV_TO_SL(tty->line);
tty977drivers/char/serial.cstatic void rs_throttle(struct tty_struct * tty, int status)
tty985drivers/char/serial.cprintk("throttle tty%d: %d (%d, %d)....\n", DEV_TO_SL(tty->line),
tty986drivers/char/serial.cstatus, LEFT(&tty->read_q), LEFT(&tty->secondary));
tty990drivers/char/serial.cinfo = rs_table + DEV_TO_SL(tty->line);
tty991drivers/char/serial.cif (tty->termios->c_iflag & IXOFF) {
tty992drivers/char/serial.cinfo->x_char = STOP_CHAR(tty);
tty1000drivers/char/serial.cinfo = rs_table + DEV_TO_SL(tty->line);
tty1001drivers/char/serial.cif (tty->termios->c_iflag & IXOFF) {
tty1005drivers/char/serial.cinfo->x_char = START_CHAR(tty);
tty1311drivers/char/serial.cstatic int rs_ioctl(struct tty_struct *tty, struct file * file,
tty1317drivers/char/serial.cline = DEV_TO_SL(tty->line);
tty1334drivers/char/serial.cput_fs_long(C_LOCAL(tty) ? 1 : 0,
tty1339drivers/char/serial.ctty->termios->c_cflag =
tty1340drivers/char/serial.c((tty->termios->c_cflag & ~CLOCAL) |
tty1388drivers/char/serial.cstatic void rs_set_termios(struct tty_struct *tty, struct termios *old_termios)
tty1392drivers/char/serial.cif (tty->termios->c_cflag == old_termios->c_cflag)
tty1395drivers/char/serial.cinfo = &rs_table[DEV_TO_SL(tty->line)];
tty1397drivers/char/serial.cchange_speed(DEV_TO_SL(tty->line));
tty1400drivers/char/serial.c!(tty->termios->c_cflag & CRTSCTS)) {
tty1401drivers/char/serial.ctty->stopped = 0;
tty1402drivers/char/serial.crs_write(tty);
tty1406drivers/char/serial.c(tty->termios->c_cflag & CLOCAL))
tty1409drivers/char/serial.cif (I_INPCK(tty))
tty1427drivers/char/serial.cstatic void rs_close(struct tty_struct *tty, struct file * filp)
tty1432drivers/char/serial.cline = DEV_TO_SL(tty->line);
tty1441drivers/char/serial.ctty->stopped = 0;    /* Force flush to succeed */
tty1442drivers/char/serial.crs_start(tty);
tty1443drivers/char/serial.cwait_until_sent(tty);
tty1450drivers/char/serial.ctty->count++; /* avoid race condition */
tty1454drivers/char/serial.ctty->count--;
tty1458drivers/char/serial.cif (tty->termios->c_cflag & CLOCAL)
tty1469drivers/char/serial.cinfo->tty = 0;
tty1477drivers/char/serial.cstatic int block_til_ready(struct tty_struct *tty, struct file * filp,
tty1482drivers/char/serial.cint    do_clocal = C_LOCAL(tty);
tty1484drivers/char/serial.cint    tty_line = tty->line;
tty1585drivers/char/serial.cint rs_open(struct tty_struct *tty, struct file * filp)
tty1591drivers/char/serial.cline = DEV_TO_SL(tty->line);
tty1599drivers/char/serial.cinfo->tty = tty;
tty1601drivers/char/serial.ctty->write = rs_write;
tty1602drivers/char/serial.ctty->close = rs_close;
tty1603drivers/char/serial.ctty->ioctl = rs_ioctl;
tty1604drivers/char/serial.ctty->throttle = rs_throttle;
tty1605drivers/char/serial.ctty->set_termios = rs_set_termios;
tty1606drivers/char/serial.ctty->stop = rs_stop;
tty1607drivers/char/serial.ctty->start = rs_start;
tty1611drivers/char/serial.cset_bit(TTY_IO_ERROR, &tty->flags);
tty1637drivers/char/serial.cretval = block_til_ready(tty, filp, info);
tty1900drivers/char/serial.cinfo->tty = 0;
tty76drivers/char/tty_io.cstatic void initialize_tty_struct(int line, struct tty_struct *tty);
tty137drivers/char/tty_io.cint tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, int buflen)
tty147drivers/char/tty_io.ctail = tty->read_q.tail;
tty148drivers/char/tty_io.chead = tty->read_q.head;
tty150drivers/char/tty_io.cok = !clear_bit (tail, &tty->readq_flags);
tty151drivers/char/tty_io.c*p++ =  tty->read_q.buf[tail++];
tty155drivers/char/tty_io.ctty->read_q.tail = tail;
tty161drivers/char/tty_io.cvoid tty_write_flush(struct tty_struct * tty)
tty163drivers/char/tty_io.cif (!tty->write || EMPTY(&tty->write_q))
tty165drivers/char/tty_io.cif (set_bit(TTY_WRITE_BUSY,&tty->flags))
tty167drivers/char/tty_io.ctty->write(tty);
tty168drivers/char/tty_io.cif (!clear_bit(TTY_WRITE_BUSY,&tty->flags))
tty172drivers/char/tty_io.cvoid tty_read_flush(struct tty_struct * tty)
tty174drivers/char/tty_io.cif (!tty || EMPTY(&tty->read_q))
tty176drivers/char/tty_io.cif (set_bit(TTY_READ_BUSY, &tty->flags))
tty178drivers/char/tty_io.cldiscs[tty->disc].handler(tty);
tty179drivers/char/tty_io.cif (!clear_bit(TTY_READ_BUSY, &tty->flags))
tty245drivers/char/tty_io.cvoid do_tty_hangup(struct tty_struct * tty, struct file_operations *fops)
tty252drivers/char/tty_io.cif (!tty)
tty254drivers/char/tty_io.cdev = 0x0400 + tty->line;
tty266drivers/char/tty_io.cwake_up_interruptible(&tty->secondary.proc_list);
tty267drivers/char/tty_io.cwake_up_interruptible(&tty->read_q.proc_list);
tty268drivers/char/tty_io.cwake_up_interruptible(&tty->write_q.proc_list);
tty269drivers/char/tty_io.cif (tty->session > 0)
tty270drivers/char/tty_io.ckill_sl(tty->session,SIGHUP,1);
tty271drivers/char/tty_io.ctty->session = 0;
tty272drivers/char/tty_io.ctty->pgrp = -1;
tty274drivers/char/tty_io.cif ((*p) && (*p)->tty == tty->line)
tty275drivers/char/tty_io.c(*p)->tty = -1;
tty279drivers/char/tty_io.cvoid tty_hangup(struct tty_struct * tty)
tty281drivers/char/tty_io.cdo_tty_hangup(tty, &hung_up_tty_fops);
tty284drivers/char/tty_io.cvoid tty_vhangup(struct tty_struct * tty)
tty286drivers/char/tty_io.cdo_tty_hangup(tty, &vhung_up_tty_fops);
tty479drivers/char/tty_io.cvoid copy_to_cooked(struct tty_struct * tty)
tty484drivers/char/tty_io.cif (!tty) {
tty488drivers/char/tty_io.cif (!tty->write) {
tty490drivers/char/tty_io.ctty->line);
tty498drivers/char/tty_io.cc = LEFT(&tty->secondary);
tty499drivers/char/tty_io.cif (tty->throttle && (c < SQ_THRESHOLD_LW)
tty500drivers/char/tty_io.c&& !set_bit(TTY_SQ_THROTTLED, &tty->flags))
tty501drivers/char/tty_io.ctty->throttle(tty, TTY_THROTTLE_SQ_FULL);
tty505drivers/char/tty_io.cif (tty->read_q.tail != tty->read_q.head) {
tty506drivers/char/tty_io.cc = 0xff & tty->read_q.buf[tty->read_q.tail];
tty507drivers/char/tty_io.cspecial_flag = clear_bit(tty->read_q.tail,
tty508drivers/char/tty_io.c&tty->readq_flags);
tty509drivers/char/tty_io.ctty->read_q.tail = (tty->read_q.tail + 1) &
tty517drivers/char/tty_io.ctty->char_error = c & 3;
tty520drivers/char/tty_io.cif (tty->char_error) {
tty521drivers/char/tty_io.cif (tty->char_error == TTY_BREAK) {
tty522drivers/char/tty_io.ctty->char_error = 0;
tty523drivers/char/tty_io.cif (I_IGNBRK(tty))
tty525drivers/char/tty_io.cif (I_PARMRK(tty)) {
tty526drivers/char/tty_io.cput_tty_queue('\377', &tty->secondary);
tty527drivers/char/tty_io.cput_tty_queue('\0', &tty->secondary);
tty529drivers/char/tty_io.cput_tty_queue('\0', &tty->secondary);
tty533drivers/char/tty_io.ctty->char_error = 0;
tty534drivers/char/tty_io.cif (I_IGNPAR(tty)) {
tty537drivers/char/tty_io.cif (I_PARMRK(tty)) {
tty538drivers/char/tty_io.cput_tty_queue('\377', &tty->secondary);
tty539drivers/char/tty_io.cput_tty_queue('\0', &tty->secondary);
tty540drivers/char/tty_io.cput_tty_queue(c, &tty->secondary);
tty542drivers/char/tty_io.cput_tty_queue('\0', &tty->secondary);
tty545drivers/char/tty_io.cif (I_STRP(tty))
tty547drivers/char/tty_io.celse if (I_PARMRK(tty) && (c == '\377'))
tty548drivers/char/tty_io.cput_tty_queue('\377', &tty->secondary);
tty550drivers/char/tty_io.cif (I_CRNL(tty))
tty552drivers/char/tty_io.celse if (I_NOCR(tty))
tty554drivers/char/tty_io.c} else if (c==10 && I_NLCR(tty))
tty556drivers/char/tty_io.cif (I_UCLC(tty))
tty559drivers/char/tty_io.ctty->lnext = 1;
tty560drivers/char/tty_io.cif (L_CANON(tty) && !tty->lnext) {
tty561drivers/char/tty_io.cif (c == KILL_CHAR(tty) || c == WERASE_CHAR(tty)) {
tty563drivers/char/tty_io.c(c == WERASE_CHAR(tty)) ? 0 : -1;
tty566drivers/char/tty_io.cwhile(!(EMPTY(&tty->secondary) ||
tty567drivers/char/tty_io.c(c=LAST(&tty->secondary))==10 ||
tty568drivers/char/tty_io.c((EOF_CHAR(tty) != __DISABLED_CHAR) &&
tty569drivers/char/tty_io.c(c==EOF_CHAR(tty))))) {
tty579drivers/char/tty_io.cif (L_ECHO(tty)) {
tty581drivers/char/tty_io.cput_tty_queue('\b', &tty->write_q);
tty582drivers/char/tty_io.cput_tty_queue(' ', &tty->write_q);
tty583drivers/char/tty_io.cput_tty_queue('\b',&tty->write_q);
tty585drivers/char/tty_io.cput_tty_queue('\b',&tty->write_q);
tty586drivers/char/tty_io.cput_tty_queue(' ',&tty->write_q);
tty587drivers/char/tty_io.cput_tty_queue('\b',&tty->write_q);
tty589drivers/char/tty_io.cDEC(tty->secondary.head);
tty593drivers/char/tty_io.cif (c == ERASE_CHAR(tty)) {
tty594drivers/char/tty_io.cif (EMPTY(&tty->secondary) ||
tty595drivers/char/tty_io.c(c=LAST(&tty->secondary))==10 ||
tty596drivers/char/tty_io.c((EOF_CHAR(tty) != __DISABLED_CHAR) &&
tty597drivers/char/tty_io.c(c==EOF_CHAR(tty))))
tty599drivers/char/tty_io.cif (L_ECHO(tty)) {
tty601drivers/char/tty_io.cput_tty_queue('\b',&tty->write_q);
tty602drivers/char/tty_io.cput_tty_queue(' ',&tty->write_q);
tty603drivers/char/tty_io.cput_tty_queue('\b',&tty->write_q);
tty605drivers/char/tty_io.cput_tty_queue('\b',&tty->write_q);
tty606drivers/char/tty_io.cput_tty_queue(' ',&tty->write_q);
tty607drivers/char/tty_io.cput_tty_queue('\b',&tty->write_q);
tty609drivers/char/tty_io.cDEC(tty->secondary.head);
tty612drivers/char/tty_io.cif (c == LNEXT_CHAR(tty)) {
tty613drivers/char/tty_io.ctty->lnext = 1;
tty614drivers/char/tty_io.cif (L_ECHO(tty)) {
tty615drivers/char/tty_io.cput_tty_queue('^',&tty->write_q);
tty616drivers/char/tty_io.cput_tty_queue('\b',&tty->write_q);
tty621drivers/char/tty_io.cif (I_IXON(tty) && !tty->lnext) {
tty622drivers/char/tty_io.cif (c == STOP_CHAR(tty)) {
tty623drivers/char/tty_io.ctty->ctrl_status &= ~(TIOCPKT_START);
tty624drivers/char/tty_io.ctty->ctrl_status |= TIOCPKT_STOP;
tty625drivers/char/tty_io.cif (tty->link)
tty626drivers/char/tty_io.cwake_up_interruptible(&tty->link->except_q);
tty627drivers/char/tty_io.ctty->stopped=1;
tty628drivers/char/tty_io.cif (tty->stop)
tty629drivers/char/tty_io.c(tty->stop)(tty);
tty630drivers/char/tty_io.cif (IS_A_CONSOLE(tty->line)) {
tty636drivers/char/tty_io.cif (((I_IXANY(tty)) && tty->stopped) ||
tty637drivers/char/tty_io.c(c == START_CHAR(tty))) {
tty638drivers/char/tty_io.ctty->ctrl_status &= ~(TIOCPKT_STOP);
tty639drivers/char/tty_io.ctty->ctrl_status |= TIOCPKT_START;
tty640drivers/char/tty_io.ctty->stopped=0;
tty641drivers/char/tty_io.cif (tty->link)
tty642drivers/char/tty_io.cwake_up_interruptible(&tty->link->except_q);
tty643drivers/char/tty_io.cif (tty->start)
tty644drivers/char/tty_io.c(tty->start)(tty);
tty645drivers/char/tty_io.cif (IS_A_CONSOLE(tty->line)) {
tty652drivers/char/tty_io.cif (L_ISIG(tty) && !tty->lnext) {
tty653drivers/char/tty_io.cif (c == INTR_CHAR(tty)) {
tty654drivers/char/tty_io.ckill_pg(tty->pgrp, SIGINT, 1);
tty655drivers/char/tty_io.cif (! _L_FLAG(tty, NOFLSH)) {
tty656drivers/char/tty_io.cflush_input(tty);
tty657drivers/char/tty_io.cflush_output(tty);
tty661drivers/char/tty_io.cif (c == QUIT_CHAR(tty)) {
tty662drivers/char/tty_io.ckill_pg(tty->pgrp, SIGQUIT, 1);
tty663drivers/char/tty_io.cif (! _L_FLAG(tty, NOFLSH)) {
tty664drivers/char/tty_io.cflush_input(tty);
tty665drivers/char/tty_io.cflush_output(tty);
tty669drivers/char/tty_io.cif (c == SUSPEND_CHAR(tty)) {
tty670drivers/char/tty_io.cif (!is_orphaned_pgrp(tty->pgrp)) {
tty671drivers/char/tty_io.ckill_pg(tty->pgrp, SIGTSTP, 1);
tty672drivers/char/tty_io.cif (! _L_FLAG(tty, NOFLSH)) {
tty673drivers/char/tty_io.cflush_input(tty);
tty674drivers/char/tty_io.cflush_output(tty);
tty680drivers/char/tty_io.cif (c==10 || (EOF_CHAR(tty) != __DISABLED_CHAR &&
tty681drivers/char/tty_io.cc==EOF_CHAR(tty)))
tty682drivers/char/tty_io.ctty->secondary.data++;
tty683drivers/char/tty_io.cif ((c==10) && (L_ECHO(tty) || (L_CANON(tty) && L_ECHONL(tty)))) {
tty684drivers/char/tty_io.cput_tty_queue('\n',&tty->write_q);
tty685drivers/char/tty_io.cput_tty_queue('\r',&tty->write_q);
tty686drivers/char/tty_io.c} else if (L_ECHO(tty)) {
tty687drivers/char/tty_io.cif (c<32 && L_ECHOCTL(tty)) {
tty688drivers/char/tty_io.cput_tty_queue('^',&tty->write_q);
tty689drivers/char/tty_io.cput_tty_queue(c+'A'-1, &tty->write_q);
tty690drivers/char/tty_io.cif (EOF_CHAR(tty) != __DISABLED_CHAR &&
tty691drivers/char/tty_io.cc==EOF_CHAR(tty) && !tty->lnext) {
tty692drivers/char/tty_io.cput_tty_queue('\b',&tty->write_q);
tty693drivers/char/tty_io.cput_tty_queue('\b',&tty->write_q);
tty696drivers/char/tty_io.cput_tty_queue(c, &tty->write_q);
tty698drivers/char/tty_io.ctty->lnext = 0;
tty699drivers/char/tty_io.cput_tty_queue(c, &tty->secondary);
tty701drivers/char/tty_io.cTTY_WRITE_FLUSH(tty);
tty702drivers/char/tty_io.cif (!EMPTY(&tty->secondary))
tty703drivers/char/tty_io.cwake_up_interruptible(&tty->secondary.proc_list);
tty704drivers/char/tty_io.cif (tty->write_q.proc_list && LEFT(&tty->write_q) > TTY_BUF_SIZE/2)
tty705drivers/char/tty_io.cwake_up_interruptible(&tty->write_q.proc_list);
tty706drivers/char/tty_io.cif (tty->throttle && (LEFT(&tty->read_q) >= RQ_THRESHOLD_HW)
tty707drivers/char/tty_io.c&& clear_bit(TTY_RQ_THROTTLED, &tty->flags))
tty708drivers/char/tty_io.ctty->throttle(tty, TTY_THROTTLE_RQ_AVAIL);
tty709drivers/char/tty_io.cif (tty->throttle && (LEFT(&tty->secondary) >= SQ_THRESHOLD_HW)
tty710drivers/char/tty_io.c&& clear_bit(TTY_SQ_THROTTLED, &tty->flags))
tty711drivers/char/tty_io.ctty->throttle(tty, TTY_THROTTLE_SQ_AVAIL);
tty723drivers/char/tty_io.cstatic void wait_for_canon_input(struct file * file, struct tty_struct * tty)
tty725drivers/char/tty_io.cif (!available_canon_input(tty)) {
tty728drivers/char/tty_io.c__wait_for_canon_input(file, tty);
tty732drivers/char/tty_io.cstatic int read_chan(struct tty_struct * tty, struct file * file, char * buf, int nr)
tty739drivers/char/tty_io.cif (L_CANON(tty))
tty742drivers/char/tty_io.ctime = 10L*tty->termios->c_cc[VTIME];
tty743drivers/char/tty_io.cminimum = tty->termios->c_cc[VMIN];
tty757drivers/char/tty_io.cif (L_CANON(tty) && !available_canon_input(tty))
tty759drivers/char/tty_io.c} else if (L_CANON(tty)) {
tty760drivers/char/tty_io.cwait_for_canon_input(file, tty);
tty768drivers/char/tty_io.cif (tty->packet && tty->link && tty->link->ctrl_status) {
tty769drivers/char/tty_io.cput_fs_byte (tty->link->ctrl_status, b);
tty770drivers/char/tty_io.ctty->link->ctrl_status = 0;
tty775drivers/char/tty_io.cif (tty->packet) {
tty783drivers/char/tty_io.cadd_wait_queue(&tty->secondary.proc_list, &wait);
tty789drivers/char/tty_io.cTTY_READ_FLUSH(tty);
tty790drivers/char/tty_io.cif (tty->link)
tty791drivers/char/tty_io.cTTY_WRITE_FLUSH(tty->link);
tty792drivers/char/tty_io.cwhile (nr > 0 && ((c = get_tty_queue(&tty->secondary)) >= 0)) {
tty793drivers/char/tty_io.cif ((EOF_CHAR(tty) != __DISABLED_CHAR &&
tty794drivers/char/tty_io.cc==EOF_CHAR(tty)) || c==10)
tty795drivers/char/tty_io.ctty->secondary.data--;
tty796drivers/char/tty_io.cif ((EOF_CHAR(tty) != __DISABLED_CHAR &&
tty797drivers/char/tty_io.cc==EOF_CHAR(tty)) && L_CANON(tty))
tty803drivers/char/tty_io.cif (c==10 && L_CANON(tty))
tty806drivers/char/tty_io.cwake_up_interruptible(&tty->read_q.proc_list);
tty811drivers/char/tty_io.cif (tty->throttle && (LEFT(&tty->secondary) >= SQ_THRESHOLD_HW)
tty812drivers/char/tty_io.c&& clear_bit(TTY_SQ_THROTTLED, &tty->flags))
tty813drivers/char/tty_io.ctty->throttle(tty, TTY_THROTTLE_SQ_AVAIL);
tty814drivers/char/tty_io.cif (tty->link) {
tty815drivers/char/tty_io.cif (IS_A_PTY_MASTER(tty->line)) {
tty816drivers/char/tty_io.cif ((tty->flags & (1 << TTY_SLAVE_OPENED))
tty817drivers/char/tty_io.c&& tty->link->count <= 1) {
tty821drivers/char/tty_io.c} else if (!tty->link->count) {
tty830drivers/char/tty_io.cTTY_READ_FLUSH(tty);
tty831drivers/char/tty_io.cif (tty->link)
tty832drivers/char/tty_io.cTTY_WRITE_FLUSH(tty->link);
tty833drivers/char/tty_io.cif (!EMPTY(&tty->secondary))
tty836drivers/char/tty_io.cif (EMPTY(&tty->secondary))
tty840drivers/char/tty_io.cremove_wait_queue(&tty->secondary.proc_list, &wait);
tty841drivers/char/tty_io.cTTY_READ_FLUSH(tty);
tty842drivers/char/tty_io.cif (tty->link && tty->link->write)
tty843drivers/char/tty_io.cTTY_WRITE_FLUSH(tty->link);
tty848drivers/char/tty_io.cif (tty->packet) {
tty860drivers/char/tty_io.cif (IS_A_PTY_MASTER(tty->line))
tty865drivers/char/tty_io.cstatic void __wait_for_canon_input(struct file * file, struct tty_struct * tty)
tty869drivers/char/tty_io.cadd_wait_queue(&tty->secondary.proc_list, &wait);
tty872drivers/char/tty_io.cif (available_canon_input(tty))
tty881drivers/char/tty_io.cremove_wait_queue(&tty->secondary.proc_list, &wait);
tty884drivers/char/tty_io.cstatic int available_canon_input(struct tty_struct * tty)
tty886drivers/char/tty_io.cTTY_READ_FLUSH(tty);
tty887drivers/char/tty_io.cif (tty->link)
tty888drivers/char/tty_io.cif (tty->link->count)
tty889drivers/char/tty_io.cTTY_WRITE_FLUSH(tty->link);
tty892drivers/char/tty_io.cif (FULL(&tty->read_q))
tty894drivers/char/tty_io.cif (tty->secondary.data)
tty899drivers/char/tty_io.cstatic int write_chan(struct tty_struct * tty, struct file * file, char * buf, int nr)
tty908drivers/char/tty_io.cadd_wait_queue(&tty->write_q.proc_list, &wait);
tty914drivers/char/tty_io.cif (tty->link && !tty->link->count) {
tty919drivers/char/tty_io.cif (FULL(&tty->write_q)) {
tty920drivers/char/tty_io.cTTY_WRITE_FLUSH(tty);
tty921drivers/char/tty_io.cif (FULL(&tty->write_q))
tty927drivers/char/tty_io.cwhile (nr>0 && !FULL(&tty->write_q)) {
tty929drivers/char/tty_io.cif (O_POST(tty)) {
tty932drivers/char/tty_io.cif (O_NLRET(tty)) {
tty933drivers/char/tty_io.ctty->column = 0;
tty935drivers/char/tty_io.cif (O_NLCR(tty)) {
tty936drivers/char/tty_io.cif (!set_bit(TTY_CR_PENDING,&tty->flags)) {
tty938drivers/char/tty_io.ctty->column = 0;
tty941drivers/char/tty_io.cclear_bit(TTY_CR_PENDING,&tty->flags);
tty946drivers/char/tty_io.cif (O_NOCR(tty) && tty->column == 0) {
tty950drivers/char/tty_io.cif (O_CRNL(tty)) {
tty952drivers/char/tty_io.cif (O_NLRET(tty))
tty953drivers/char/tty_io.ctty->column = 0;
tty956drivers/char/tty_io.ctty->column = 0;
tty959drivers/char/tty_io.cif (O_TABDLY(tty) == XTABS) {
tty961drivers/char/tty_io.ctty->column++;
tty962drivers/char/tty_io.cif (tty->column % 8 != 0) {
tty968drivers/char/tty_io.ctty->column--;
tty971drivers/char/tty_io.cif (O_LCUC(tty))
tty973drivers/char/tty_io.ctty->column++;
tty978drivers/char/tty_io.cput_tty_queue(c,&tty->write_q);
tty983drivers/char/tty_io.cremove_wait_queue(&tty->write_q.proc_list, &wait);
tty984drivers/char/tty_io.cTTY_WRITE_FLUSH(tty);
tty987drivers/char/tty_io.cif (tty->link && !tty->link->count)
tty997drivers/char/tty_io.cstruct tty_struct * tty;
tty1005drivers/char/tty_io.ctty = TTY_TABLE(dev);
tty1006drivers/char/tty_io.cif (!tty || (tty->flags & (1 << TTY_IO_ERROR)))
tty1009drivers/char/tty_io.c(tty->pgrp > 0) &&
tty1010drivers/char/tty_io.c(current->tty == dev) &&
tty1011drivers/char/tty_io.c(tty->pgrp != current->pgrp))
tty1018drivers/char/tty_io.cif (ldiscs[tty->disc].read)
tty1019drivers/char/tty_io.ci = (ldiscs[tty->disc].read)(tty,file,buf,count);
tty1030drivers/char/tty_io.cstruct tty_struct * tty;
tty1040drivers/char/tty_io.ctty = redirect;
tty1042drivers/char/tty_io.ctty = TTY_TABLE(dev);
tty1043drivers/char/tty_io.cif (!tty || !tty->write || (tty->flags & (1 << TTY_IO_ERROR)))
tty1045drivers/char/tty_io.cif (!is_console && L_TOSTOP(tty) && (tty->pgrp > 0) &&
tty1046drivers/char/tty_io.c(current->tty == dev) && (tty->pgrp != current->pgrp)) {
tty1054drivers/char/tty_io.cif (ldiscs[tty->disc].write)
tty1055drivers/char/tty_io.ci = (ldiscs[tty->disc].write)(tty,file,buf,count);
tty1070drivers/char/tty_io.cstruct tty_struct *tty, *o_tty;
tty1076drivers/char/tty_io.ctty = o_tty = NULL;
tty1084drivers/char/tty_io.cif (!tty_table[dev] && !tty) {
tty1085drivers/char/tty_io.cif (!(tty = (struct tty_struct*) get_free_page(GFP_KERNEL)))
tty1087drivers/char/tty_io.cinitialize_tty_struct(dev, tty);
tty1139drivers/char/tty_io.ctty->termios = tty_termios[dev];
tty1140drivers/char/tty_io.ctty_table[dev] = tty;
tty1141drivers/char/tty_io.ctty = NULL;
tty1169drivers/char/tty_io.cif (tty)
tty1170drivers/char/tty_io.cfree_page((unsigned long) tty);
tty1191drivers/char/tty_io.cstruct tty_struct *tty, *o_tty;
tty1195drivers/char/tty_io.ctty = tty_table[dev];
tty1199drivers/char/tty_io.cif (!tty) {
tty1218drivers/char/tty_io.cif (tty->link != o_tty || o_tty->link != tty) {
tty1223drivers/char/tty_io.ctty->write_data_cnt = 0; /* Clear out pending trash */
tty1224drivers/char/tty_io.cif (tty->close)
tty1225drivers/char/tty_io.ctty->close(tty, filp);
tty1227drivers/char/tty_io.cif (--tty->link->count < 0) {
tty1229drivers/char/tty_io.cdev, tty->count);
tty1230drivers/char/tty_io.ctty->link->count = 0;
tty1233drivers/char/tty_io.cif (--tty->count < 0) {
tty1235drivers/char/tty_io.cdev, tty->count);
tty1236drivers/char/tty_io.ctty->count = 0;
tty1238drivers/char/tty_io.cif (tty->count)
tty1246drivers/char/tty_io.cif ((*p) && (*p)->tty == tty->line)
tty1247drivers/char/tty_io.c(*p)->tty = -1;
tty1250drivers/char/tty_io.cif (ldiscs[tty->disc].close != NULL)
tty1251drivers/char/tty_io.cldiscs[tty->disc].close(tty);
tty1266drivers/char/tty_io.cif (tty == redirect || o_tty == redirect)
tty1268drivers/char/tty_io.cfree_page((unsigned long) tty);
tty1289drivers/char/tty_io.cstruct tty_struct *tty;
tty1299drivers/char/tty_io.cminor = current->tty;
tty1319drivers/char/tty_io.ctty = tty_table[minor];
tty1331drivers/char/tty_io.ctty->ctrl_status = 0;
tty1332drivers/char/tty_io.ctty->packet = 0;
tty1334drivers/char/tty_io.cif (tty->open) {
tty1335drivers/char/tty_io.cretval = tty->open(tty, filp);
tty1345drivers/char/tty_io.ccurrent->tty<0 &&
tty1346drivers/char/tty_io.ctty->session==0) {
tty1347drivers/char/tty_io.ccurrent->tty = minor;
tty1348drivers/char/tty_io.ctty->session = current->session;
tty1349drivers/char/tty_io.ctty->pgrp = current->pgrp;
tty1380drivers/char/tty_io.cstruct tty_struct * tty;
tty1388drivers/char/tty_io.ctty = TTY_TABLE(dev);
tty1389drivers/char/tty_io.cif (!tty) {
tty1395drivers/char/tty_io.cif (L_CANON(tty)) {
tty1396drivers/char/tty_io.cif (available_canon_input(tty))
tty1398drivers/char/tty_io.c} else if (!EMPTY(&tty->secondary))
tty1400drivers/char/tty_io.cif (tty->link) {
tty1401drivers/char/tty_io.cif (IS_A_PTY_MASTER(tty->line)) {
tty1402drivers/char/tty_io.cif ((tty->flags & (1 << TTY_SLAVE_OPENED))
tty1403drivers/char/tty_io.c&& tty->link->count <= 1)
tty1406drivers/char/tty_io.cif (!tty->link->count)
tty1412drivers/char/tty_io.cif (tty->packet && tty->link && tty->link->ctrl_status)
tty1415drivers/char/tty_io.cselect_wait(&tty->secondary.proc_list, wait);
tty1418drivers/char/tty_io.cif (!FULL(&tty->write_q))
tty1420drivers/char/tty_io.cselect_wait(&tty->write_q.proc_list, wait);
tty1423drivers/char/tty_io.cif (tty->link) {
tty1424drivers/char/tty_io.cif (IS_A_PTY_MASTER(tty->line)) {
tty1425drivers/char/tty_io.cif ((tty->flags & (1 << TTY_SLAVE_OPENED))
tty1426drivers/char/tty_io.c&& tty->link->count <= 1)
tty1428drivers/char/tty_io.cif (tty->packet
tty1429drivers/char/tty_io.c&& tty->link->ctrl_status)
tty1432drivers/char/tty_io.cif (!tty->link->count)
tty1436drivers/char/tty_io.cselect_wait(&tty->except_q, wait);
tty1454drivers/char/tty_io.cvoid do_SAK( struct tty_struct *tty)
tty1457drivers/char/tty_io.cint line = tty->line;
tty1458drivers/char/tty_io.cint session = tty->session;
tty1462drivers/char/tty_io.cflush_input(tty);
tty1463drivers/char/tty_io.cflush_output(tty);
tty1467drivers/char/tty_io.cif (((*p)->tty == line) ||
tty1498drivers/char/tty_io.cint tty_write_data(struct tty_struct *tty, char *bufp, int buflen,
tty1509drivers/char/tty_io.cif (tty->write_data_cnt) {
tty1514drivers/char/tty_io.chead = tty->write_q.head;
tty1515drivers/char/tty_io.ctail = tty->write_q.tail;
tty1520drivers/char/tty_io.ctty->write_q.buf[head++] = *p++;
tty1524drivers/char/tty_io.ctty->write_q.head = head;
tty1526drivers/char/tty_io.ctty->write_data_cnt = count;
tty1527drivers/char/tty_io.ctty->write_data_ptr = (unsigned char *) p;
tty1528drivers/char/tty_io.ctty->write_data_callback = callback;
tty1529drivers/char/tty_io.ctty->write_data_arg = callarg;
tty1532drivers/char/tty_io.ctty->write(tty);
tty1549drivers/char/tty_io.cstruct tty_struct * tty;
tty1558drivers/char/tty_io.ctty = tty_table[line];
tty1559drivers/char/tty_io.cif (!tty || !tty->write_data_cnt)
tty1562drivers/char/tty_io.chead = tty->write_q.head;
tty1563drivers/char/tty_io.ctail = tty->write_q.tail;
tty1564drivers/char/tty_io.ccount = tty->write_data_cnt;
tty1565drivers/char/tty_io.cp = tty->write_data_ptr;
tty1568drivers/char/tty_io.ctty->write_q.buf[head++] = *p++;
tty1572drivers/char/tty_io.ctty->write_q.head = head;
tty1573drivers/char/tty_io.ctty->write_data_ptr = p;
tty1574drivers/char/tty_io.ctty->write_data_cnt = count;
tty1577drivers/char/tty_io.c(tty->write_data_callback)
tty1578drivers/char/tty_io.c(tty->write_data_arg);
tty1589drivers/char/tty_io.cstatic void initialize_tty_struct(int line, struct tty_struct *tty)
tty1591drivers/char/tty_io.cmemset(tty, 0, sizeof(struct tty_struct));
tty1592drivers/char/tty_io.ctty->line = line;
tty1593drivers/char/tty_io.ctty->disc = N_TTY;
tty1594drivers/char/tty_io.ctty->pgrp = -1;
tty1595drivers/char/tty_io.ctty->winsize.ws_row = 0;
tty1596drivers/char/tty_io.ctty->winsize.ws_col = 0;
tty1598drivers/char/tty_io.ctty->open = con_open;
tty1599drivers/char/tty_io.ctty->winsize.ws_row = video_num_lines;
tty1600drivers/char/tty_io.ctty->winsize.ws_col = video_num_columns;
tty1602drivers/char/tty_io.ctty->open = rs_open;
tty1604drivers/char/tty_io.ctty->open = pty_open;
tty1606drivers/char/tty_io.ctty->except_q = NULL;
tty38drivers/char/tty_ioctl.cextern int paste_selection(struct tty_struct *tty);
tty41drivers/char/tty_ioctl.cstatic int tty_set_ldisc(struct tty_struct *tty, int ldisc);
tty53drivers/char/tty_ioctl.cvoid flush_input(struct tty_struct * tty)
tty55drivers/char/tty_ioctl.ctty->ctrl_status |= TIOCPKT_FLUSHREAD;
tty56drivers/char/tty_ioctl.cif (tty->link)
tty57drivers/char/tty_ioctl.cwake_up_interruptible(&tty->link->except_q);
tty58drivers/char/tty_ioctl.cflush(&tty->read_q);
tty59drivers/char/tty_ioctl.cwake_up_interruptible(&tty->read_q.proc_list);
tty60drivers/char/tty_ioctl.cflush(&tty->secondary);
tty61drivers/char/tty_ioctl.ctty->secondary.data = 0;
tty63drivers/char/tty_ioctl.cif ((tty = tty->link) != NULL) {
tty64drivers/char/tty_ioctl.cflush(&tty->write_q);
tty65drivers/char/tty_ioctl.cwake_up_interruptible(&tty->write_q.proc_list);
tty69drivers/char/tty_ioctl.cvoid flush_output(struct tty_struct * tty)
tty71drivers/char/tty_ioctl.ctty->ctrl_status |= TIOCPKT_FLUSHWRITE;
tty72drivers/char/tty_ioctl.cif (tty->link)
tty73drivers/char/tty_ioctl.cwake_up_interruptible(&tty->link->except_q);
tty74drivers/char/tty_ioctl.cflush(&tty->write_q);
tty75drivers/char/tty_ioctl.cwake_up_interruptible(&tty->write_q.proc_list);
tty76drivers/char/tty_ioctl.cif ((tty = tty->link) != NULL) {
tty77drivers/char/tty_ioctl.cflush(&tty->read_q);
tty78drivers/char/tty_ioctl.cwake_up_interruptible(&tty->read_q.proc_list);
tty79drivers/char/tty_ioctl.cflush(&tty->secondary);
tty80drivers/char/tty_ioctl.ctty->secondary.data = 0;
tty84drivers/char/tty_ioctl.cvoid wait_until_sent(struct tty_struct * tty)
tty88drivers/char/tty_ioctl.cTTY_WRITE_FLUSH(tty);
tty89drivers/char/tty_ioctl.cif (EMPTY(&tty->write_q))
tty91drivers/char/tty_ioctl.cadd_wait_queue(&tty->write_q.proc_list, &wait);
tty97drivers/char/tty_ioctl.cTTY_WRITE_FLUSH(tty);
tty98drivers/char/tty_ioctl.cif (EMPTY(&tty->write_q))
tty103drivers/char/tty_ioctl.cremove_wait_queue(&tty->write_q.proc_list, &wait);
tty158drivers/char/tty_ioctl.cstatic int get_termios(struct tty_struct * tty, struct termios * termios)
tty166drivers/char/tty_ioctl.cput_fs_byte( ((char *)tty->termios)[i] , i+(char *)termios );
tty170drivers/char/tty_ioctl.cstatic int check_change(struct tty_struct * tty, int channel)
tty175drivers/char/tty_ioctl.cif (current->tty != channel)
tty177drivers/char/tty_ioctl.cif (tty->pgrp <= 0 || tty->pgrp == current->pgrp)
tty187drivers/char/tty_ioctl.cstatic int set_termios(struct tty_struct * tty, struct termios * termios,
tty191drivers/char/tty_ioctl.cstruct termios old_termios = *tty->termios;
tty193drivers/char/tty_ioctl.ci = check_change(tty, channel);
tty197drivers/char/tty_ioctl.c((char *)tty->termios)[i]=get_fs_byte(i+(char *)termios);
tty205drivers/char/tty_ioctl.cnew_flow = (tty->termios->c_iflag & IXON) &&
tty206drivers/char/tty_ioctl.c(tty->termios->c_cc[VSTOP] == '\023') &&
tty207drivers/char/tty_ioctl.c(tty->termios->c_cc[VSTART] == '\021');
tty210drivers/char/tty_ioctl.ctty->ctrl_status &= ~(TIOCPKT_DOSTOP|TIOCPKT_NOSTOP);
tty212drivers/char/tty_ioctl.ctty->ctrl_status |= TIOCPKT_DOSTOP;
tty214drivers/char/tty_ioctl.ctty->ctrl_status |= TIOCPKT_NOSTOP;    
tty215drivers/char/tty_ioctl.cif (tty->link)
tty216drivers/char/tty_ioctl.cwake_up_interruptible(&tty->link->except_q);
tty225drivers/char/tty_ioctl.cif (IS_A_PTY_MASTER(channel)) tty->termios->c_lflag &= ~ECHO;
tty228drivers/char/tty_ioctl.cunset_locked_termios(tty->termios, &old_termios,
tty229drivers/char/tty_ioctl.ctermios_locked[tty->line]);
tty232drivers/char/tty_ioctl.cretval = tty_set_ldisc(tty, tty->termios->c_line);
tty237drivers/char/tty_ioctl.cif (tty->set_termios)
tty238drivers/char/tty_ioctl.c(*tty->set_termios)(tty, &old_termios);
tty243drivers/char/tty_ioctl.cstatic int get_termio(struct tty_struct * tty, struct termio * termio)
tty251drivers/char/tty_ioctl.ctmp_termio.c_iflag = tty->termios->c_iflag;
tty252drivers/char/tty_ioctl.ctmp_termio.c_oflag = tty->termios->c_oflag;
tty253drivers/char/tty_ioctl.ctmp_termio.c_cflag = tty->termios->c_cflag;
tty254drivers/char/tty_ioctl.ctmp_termio.c_lflag = tty->termios->c_lflag;
tty255drivers/char/tty_ioctl.ctmp_termio.c_line = tty->termios->c_line;
tty257drivers/char/tty_ioctl.ctmp_termio.c_cc[i] = tty->termios->c_cc[i];
tty263drivers/char/tty_ioctl.cstatic int set_termio(struct tty_struct * tty, struct termio * termio,
tty268drivers/char/tty_ioctl.cstruct termios old_termios = *tty->termios;
tty272drivers/char/tty_ioctl.ci = check_change(tty, channel);
tty277drivers/char/tty_ioctl.cSET_LOW_BITS(tty->termios->c_iflag, tmp_termio.c_iflag);
tty278drivers/char/tty_ioctl.cSET_LOW_BITS(tty->termios->c_oflag, tmp_termio.c_oflag);
tty279drivers/char/tty_ioctl.cSET_LOW_BITS(tty->termios->c_cflag, tmp_termio.c_cflag);
tty280drivers/char/tty_ioctl.cSET_LOW_BITS(tty->termios->c_lflag, tmp_termio.c_lflag);
tty281drivers/char/tty_ioctl.cmemcpy(tty->termios->c_cc, tmp_termio.c_cc, NCC);
tty289drivers/char/tty_ioctl.cnew_flow = (tty->termios->c_iflag & IXON) &&
tty290drivers/char/tty_ioctl.c(tty->termios->c_cc[VSTOP] == '\023') &&
tty291drivers/char/tty_ioctl.c(tty->termios->c_cc[VSTART] == '\021');
tty294drivers/char/tty_ioctl.ctty->ctrl_status &= ~(TIOCPKT_DOSTOP|TIOCPKT_NOSTOP);
tty296drivers/char/tty_ioctl.ctty->ctrl_status |= TIOCPKT_DOSTOP;
tty298drivers/char/tty_ioctl.ctty->ctrl_status |= TIOCPKT_NOSTOP;    
tty299drivers/char/tty_ioctl.cif (tty->link)
tty300drivers/char/tty_ioctl.cwake_up_interruptible(&tty->link->except_q);
tty303drivers/char/tty_ioctl.cunset_locked_termios(tty->termios, &old_termios,
tty304drivers/char/tty_ioctl.ctermios_locked[tty->line]);
tty307drivers/char/tty_ioctl.cretval = tty_set_ldisc(tty, tmp_termio.c_line);
tty312drivers/char/tty_ioctl.cif (tty->set_termios)
tty313drivers/char/tty_ioctl.c(*tty->set_termios)(tty, &old_termios);
tty318drivers/char/tty_ioctl.cstatic int get_lcktrmios(struct tty_struct * tty, struct termios * termios,
tty332drivers/char/tty_ioctl.cstatic int set_lcktrmios(struct tty_struct * tty, struct termios * termios,
tty346drivers/char/tty_ioctl.cstatic int set_window_size(struct tty_struct * tty, struct winsize * ws)
tty353drivers/char/tty_ioctl.ctmp = (char *) &tty->winsize;
tty363drivers/char/tty_ioctl.ckill_pg(tty->pgrp, SIGWINCH, 1);
tty367drivers/char/tty_ioctl.cstatic int get_window_size(struct tty_struct * tty, struct winsize * ws)
tty379drivers/char/tty_ioctl.cput_fs_byte(((char *) &tty->winsize)[i], tmp);
tty384drivers/char/tty_ioctl.cstatic int tty_set_ldisc(struct tty_struct *tty, int ldisc)
tty390drivers/char/tty_ioctl.cif (tty->disc == ldisc)
tty394drivers/char/tty_ioctl.cwait_until_sent(tty);
tty395drivers/char/tty_ioctl.cflush_input(tty);
tty396drivers/char/tty_ioctl.cif (ldiscs[tty->disc].close)
tty397drivers/char/tty_ioctl.cldiscs[tty->disc].close(tty);
tty400drivers/char/tty_ioctl.ctty->disc = ldisc;
tty401drivers/char/tty_ioctl.ctty->termios->c_line = ldisc;
tty402drivers/char/tty_ioctl.cif (ldiscs[tty->disc].open)
tty403drivers/char/tty_ioctl.creturn(ldiscs[tty->disc].open(tty));
tty412drivers/char/tty_ioctl.cstruct tty_struct * tty;
tty425drivers/char/tty_ioctl.ctty = TTY_TABLE(dev);
tty426drivers/char/tty_ioctl.cif (!tty)
tty432drivers/char/tty_ioctl.ctermios_tty = tty;
tty442drivers/char/tty_ioctl.cflush_input(tty);
tty445drivers/char/tty_ioctl.cwait_until_sent(tty);
tty452drivers/char/tty_ioctl.cflush_input(tty);
tty455drivers/char/tty_ioctl.cwait_until_sent(tty); /* fallthrough */
tty461drivers/char/tty_ioctl.ctty->stopped = 1;
tty462drivers/char/tty_ioctl.cif (tty->stop)
tty463drivers/char/tty_ioctl.c(tty->stop)(tty);
tty464drivers/char/tty_ioctl.cTTY_WRITE_FLUSH(tty);
tty467drivers/char/tty_ioctl.ctty->stopped = 0;
tty468drivers/char/tty_ioctl.cif (tty->start)
tty469drivers/char/tty_ioctl.c(tty->start)(tty);
tty470drivers/char/tty_ioctl.cTTY_WRITE_FLUSH(tty);
tty473drivers/char/tty_ioctl.cif (STOP_CHAR(tty))
tty474drivers/char/tty_ioctl.cput_tty_queue(STOP_CHAR(tty),
tty475drivers/char/tty_ioctl.c&tty->write_q);
tty478drivers/char/tty_ioctl.cif (START_CHAR(tty))
tty479drivers/char/tty_ioctl.cput_tty_queue(START_CHAR(tty),
tty480drivers/char/tty_ioctl.c&tty->write_q);
tty486drivers/char/tty_ioctl.cflush_input(tty);
tty488drivers/char/tty_ioctl.cflush_output(tty);
tty490drivers/char/tty_ioctl.cflush_input(tty);
tty491drivers/char/tty_ioctl.cflush_output(tty);
tty500drivers/char/tty_ioctl.cif ((current->leader && current->tty < 0 &&
tty501drivers/char/tty_ioctl.ctty->session == 0) ||
tty503drivers/char/tty_ioctl.ccurrent->tty = dev;
tty504drivers/char/tty_ioctl.ctty->session = current->session;
tty505drivers/char/tty_ioctl.ctty->pgrp = current->pgrp;
tty515drivers/char/tty_ioctl.cif ((current->tty < 0) ||
tty516drivers/char/tty_ioctl.c(current->tty != termios_dev) ||
tty529drivers/char/tty_ioctl.cput_fs_long(CHARS(&tty->write_q),
tty536drivers/char/tty_ioctl.cif (L_CANON(tty) && !tty->secondary.data)
tty539drivers/char/tty_ioctl.cput_fs_long(CHARS(&tty->secondary),
tty545drivers/char/tty_ioctl.creturn get_window_size(tty,(struct winsize *) arg);
tty549drivers/char/tty_ioctl.creturn set_window_size(tty,(struct winsize *) arg);
tty565drivers/char/tty_ioctl.creturn paste_selection(tty);
tty584drivers/char/tty_ioctl.credirect = tty;
tty596drivers/char/tty_ioctl.cif (MINOR(file->f_rdev) != current->tty)
tty598drivers/char/tty_ioctl.ccurrent->tty = -1;
tty600drivers/char/tty_ioctl.cif (tty->pgrp > 0)
tty601drivers/char/tty_ioctl.ckill_pg(tty->pgrp, SIGHUP, 0);
tty602drivers/char/tty_ioctl.ctty->pgrp = -1;
tty603drivers/char/tty_ioctl.ctty->session = 0;
tty609drivers/char/tty_ioctl.cput_fs_long(tty->disc, (unsigned long *) arg);
tty613drivers/char/tty_ioctl.creturn tty_set_ldisc(tty, arg);
tty616drivers/char/tty_ioctl.creturn get_lcktrmios(tty, (struct termios *) arg,
tty620drivers/char/tty_ioctl.creturn set_lcktrmios(tty, (struct termios *) arg,
tty629drivers/char/tty_ioctl.ctty->packet = (get_fs_long ((unsigned long *)arg) != 0);
tty632drivers/char/tty_ioctl.cwait_until_sent(tty);
tty633drivers/char/tty_ioctl.cif (!tty->ioctl)
tty635drivers/char/tty_ioctl.ctty->ioctl(tty, file, cmd, arg);
tty638drivers/char/tty_ioctl.cif (tty->ioctl) {
tty639drivers/char/tty_ioctl.cretval = (tty->ioctl)(tty, file, cmd, arg);
tty643drivers/char/tty_ioctl.cif (ldiscs[tty->disc].ioctl) {
tty644drivers/char/tty_ioctl.cretval = (ldiscs[tty->disc].ioctl)
tty645drivers/char/tty_ioctl.c(tty, file, cmd, arg);
tty105drivers/char/vt.cint vt_ioctl(struct tty_struct *tty, struct file * file,
tty112drivers/char/vt.cconsole = tty->line - 1;
tty220drivers/char/vt.cflush_input(tty);
tty145drivers/net/slip.csl->tty    = NULL;
tty165drivers/net/slip.csl_find(struct tty_struct *tty)
tty170drivers/net/slip.cif (tty == NULL) return(NULL);
tty173drivers/net/slip.cif (sl->tty == tty) return(sl);
tty193drivers/net/slip.csl->tty = NULL;
tty213drivers/net/slip.csl->tty = NULL;
tty481drivers/net/slip.cif (tty_write_data(sl->tty, (char *) bp, count,
tty493drivers/net/slip.cstruct tty_struct *tty;
tty498drivers/net/slip.ctty = sl->tty;
tty660drivers/net/slip.cif (sl->tty == NULL) {
tty731drivers/net/slip.cif (sl->tty == NULL) {
tty757drivers/net/slip.cslip_recv(struct tty_struct *tty)
tty764drivers/net/slip.cDPRINTF((DBG_SLIP, "SLIP: slip_recv(%d) called\n", tty->line));
tty765drivers/net/slip.cif ((sl = sl_find(tty)) == NULL) return;  /* not connected */
tty772drivers/net/slip.ccount = tty_read_raw_data(tty, buff, 128);
tty821drivers/net/slip.cslip_open(struct tty_struct *tty)
tty826drivers/net/slip.cif ((sl = sl_find(tty)) != NULL) {
tty828drivers/net/slip.ctty->line, sl->dev->name));
tty835drivers/net/slip.ctty->line));
tty838drivers/net/slip.csl->tty = tty;
tty839drivers/net/slip.ctty_read_flush(tty);
tty840drivers/net/slip.ctty_write_flush(tty);
tty845drivers/net/slip.ctty->line, sl->dev->name));
tty859drivers/net/slip.cslip_close(struct tty_struct *tty)
tty864drivers/net/slip.cif ((sl = sl_find(tty)) == NULL) {
tty865drivers/net/slip.cDPRINTF((DBG_SLIP, "SLIP: TTY %d not connected !\n", tty->line));
tty871drivers/net/slip.ctty->line, sl->dev->name));
tty1059drivers/net/slip.cslip_ioctl(struct tty_struct *tty, void *file, int cmd, void *arg)
tty1065drivers/net/slip.cif ((sl = sl_find(tty)) == NULL) {
tty1066drivers/net/slip.cDPRINTF((DBG_SLIP, "SLIP: ioctl: TTY %d not connected !\n", tty->line));
tty1070drivers/net/slip.cDPRINTF((DBG_SLIP, "SLIP: ioctl(%d, 0x%X, 0x%X)\n", tty->line, cmd, arg));
tty38drivers/net/slip.hstruct tty_struct  *tty;    /* ptr to TTY structure    */
tty461fs/open.cstruct tty_struct *tty;
tty466fs/open.cif (current->tty < 0)
tty468fs/open.ctty = TTY_TABLE(MINOR(current->tty));
tty469fs/open.ctty_vhangup(tty);
tty258fs/proc/array.ctty_pgrp = (*p)->tty;
tty272fs/proc/array.c(*p)->tty,
tty202include/linux/sched.hint tty;    /* -1 if no tty, so it must be signed */
tty28include/linux/serial.hstruct tty_struct   *tty;
tty147include/linux/tty.h#define INTR_CHAR(tty) ((tty)->termios->c_cc[VINTR])
tty148include/linux/tty.h#define QUIT_CHAR(tty) ((tty)->termios->c_cc[VQUIT])
tty149include/linux/tty.h#define ERASE_CHAR(tty) ((tty)->termios->c_cc[VERASE])
tty150include/linux/tty.h#define KILL_CHAR(tty) ((tty)->termios->c_cc[VKILL])
tty151include/linux/tty.h#define WERASE_CHAR(tty) ((tty)->termios->c_cc[VWERASE])
tty152include/linux/tty.h#define EOF_CHAR(tty) ((tty)->termios->c_cc[VEOF])
tty153include/linux/tty.h#define START_CHAR(tty) ((tty)->termios->c_cc[VSTART])
tty154include/linux/tty.h#define STOP_CHAR(tty) ((tty)->termios->c_cc[VSTOP])
tty155include/linux/tty.h#define SUSPEND_CHAR(tty) ((tty)->termios->c_cc[VSUSP])
tty156include/linux/tty.h#define LNEXT_CHAR(tty)  ((tty)->termios->c_cc[VLNEXT])
tty158include/linux/tty.h#define _L_FLAG(tty,f)  ((tty)->termios->c_lflag & f)
tty159include/linux/tty.h#define _I_FLAG(tty,f)  ((tty)->termios->c_iflag & f)
tty160include/linux/tty.h#define _O_FLAG(tty,f)  ((tty)->termios->c_oflag & f)
tty161include/linux/tty.h#define _C_FLAG(tty,f)  ((tty)->termios->c_cflag & f)
tty163include/linux/tty.h#define L_CANON(tty)  _L_FLAG((tty),ICANON)
tty164include/linux/tty.h#define L_ISIG(tty)  _L_FLAG((tty),ISIG)
tty165include/linux/tty.h#define L_ECHO(tty)  _L_FLAG((tty),ECHO)
tty166include/linux/tty.h#define L_ECHOE(tty)  _L_FLAG((tty),ECHOE)
tty167include/linux/tty.h#define L_ECHOK(tty)  _L_FLAG((tty),ECHOK)
tty168include/linux/tty.h#define L_ECHONL(tty)  _L_FLAG((tty),ECHONL)
tty169include/linux/tty.h#define L_ECHOCTL(tty)  _L_FLAG((tty),ECHOCTL)
tty170include/linux/tty.h#define L_ECHOKE(tty)  _L_FLAG((tty),ECHOKE)
tty171include/linux/tty.h#define L_TOSTOP(tty)  _L_FLAG((tty),TOSTOP)
tty173include/linux/tty.h#define I_IGNBRK(tty)  _I_FLAG((tty),IGNBRK)
tty174include/linux/tty.h#define I_BRKINT(tty)  _I_FLAG((tty),BRKINT)
tty175include/linux/tty.h#define I_IGNPAR(tty)  _I_FLAG((tty),IGNPAR)
tty176include/linux/tty.h#define I_PARMRK(tty)  _I_FLAG((tty),PARMRK)
tty177include/linux/tty.h#define I_INPCK(tty)  _I_FLAG((tty),INPCK)
tty178include/linux/tty.h#define I_UCLC(tty)  _I_FLAG((tty),IUCLC)
tty179include/linux/tty.h#define I_NLCR(tty)  _I_FLAG((tty),INLCR)
tty180include/linux/tty.h#define I_CRNL(tty)  _I_FLAG((tty),ICRNL)
tty181include/linux/tty.h#define I_NOCR(tty)  _I_FLAG((tty),IGNCR)
tty182include/linux/tty.h#define I_IXON(tty)  _I_FLAG((tty),IXON)
tty183include/linux/tty.h#define I_IXANY(tty)  _I_FLAG((tty),IXANY)
tty184include/linux/tty.h#define I_STRP(tty)  _I_FLAG((tty),ISTRIP)
tty186include/linux/tty.h#define O_POST(tty)  _O_FLAG((tty),OPOST)
tty187include/linux/tty.h#define O_LCUC(tty)  _O_FLAG((tty),OLCUC)
tty188include/linux/tty.h#define O_NLCR(tty)  _O_FLAG((tty),ONLCR)
tty189include/linux/tty.h#define O_CRNL(tty)  _O_FLAG((tty),OCRNL)
tty190include/linux/tty.h#define O_NOCR(tty)  _O_FLAG((tty),ONOCR)
tty191include/linux/tty.h#define O_NLRET(tty)  _O_FLAG((tty),ONLRET)
tty192include/linux/tty.h#define O_TABDLY(tty)  _O_FLAG((tty),TABDLY)
tty194include/linux/tty.h#define C_LOCAL(tty)  _C_FLAG((tty),CLOCAL)
tty195include/linux/tty.h#define C_RTSCTS(tty)  _C_FLAG((tty),CRTSCTS)
tty196include/linux/tty.h#define C_SPEED(tty)  ((tty)->termios->c_cflag & CBAUD)
tty197include/linux/tty.h#define C_HUP(tty)  (C_SPEED((tty)) == B0)
tty226include/linux/tty.hint  (*open)(struct tty_struct * tty, struct file * filp);
tty227include/linux/tty.hvoid (*close)(struct tty_struct * tty, struct file * filp);
tty228include/linux/tty.hvoid (*write)(struct tty_struct * tty);
tty229include/linux/tty.hint  (*ioctl)(struct tty_struct *tty, struct file * file,
tty231include/linux/tty.hvoid (*throttle)(struct tty_struct * tty, int status);
tty232include/linux/tty.hvoid (*set_termios)(struct tty_struct *tty, struct termios * old);
tty233include/linux/tty.hvoid (*stop)(struct tty_struct *tty);
tty234include/linux/tty.hvoid (*start)(struct tty_struct *tty);
tty255include/linux/tty.hint  (*read)(struct tty_struct * tty, struct file * file,
tty257include/linux/tty.hint  (*write)(struct tty_struct * tty, struct file * file,
tty259include/linux/tty.hint  (*ioctl)(struct tty_struct * tty, struct file * file,
tty325include/linux/tty.h#define TTY_WRITE_FLUSH(tty) tty_write_flush((tty))
tty326include/linux/tty.h#define TTY_READ_FLUSH(tty) tty_read_flush((tty))
tty358include/linux/tty.hextern void flush_input(struct tty_struct * tty);
tty359include/linux/tty.hextern void flush_output(struct tty_struct * tty);
tty360include/linux/tty.hextern void wait_until_sent(struct tty_struct * tty);
tty361include/linux/tty.hextern void copy_to_cooked(struct tty_struct * tty);
tty363include/linux/tty.hextern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp,
tty365include/linux/tty.hextern int tty_write_data(struct tty_struct *tty, char *bufp, int buflen,
tty371include/linux/tty.hextern int tty_signal(int sig, struct tty_struct *tty);
tty372include/linux/tty.hextern void tty_hangup(struct tty_struct * tty);
tty373include/linux/tty.hextern void tty_vhangup(struct tty_struct * tty);
tty376include/linux/tty.hextern void do_SAK(struct tty_struct *tty);
tty380include/linux/tty.hextern void rs_write(struct tty_struct * tty);
tty381include/linux/tty.hextern void con_write(struct tty_struct * tty);
tty385include/linux/tty.hextern int  rs_open(struct tty_struct * tty, struct file * filp);
tty389include/linux/tty.hextern int  pty_open(struct tty_struct * tty, struct file * filp);
tty393include/linux/tty.hextern int con_open(struct tty_struct * tty, struct file * filp);
tty400include/linux/tty.hextern int vt_ioctl(struct tty_struct *tty, struct file * file,
tty457kernel/exit.cstruct tty_struct *tty;
tty459kernel/exit.cif (current->tty >= 0) {
tty460kernel/exit.ctty = TTY_TABLE(current->tty);
tty461kernel/exit.cif (tty) {
tty462kernel/exit.cif (tty->pgrp > 0)
tty463kernel/exit.ckill_pg(tty->pgrp, SIGHUP, 1);
tty464kernel/exit.ctty->pgrp = -1;
tty465kernel/exit.ctty->session = 0;
tty470kernel/exit.cp->tty = -1;
tty504kernel/sys.ccurrent->tty = -1;