taglinefilesource code
tty151include/linux/sched.hint tty;    /* -1 if no tty, so it must be signed */
tty76include/linux/tty.hstruct tty_struct * tty;
tty106include/linux/tty.h#define INTR_CHAR(tty) ((tty)->termios.c_cc[VINTR])
tty107include/linux/tty.h#define QUIT_CHAR(tty) ((tty)->termios.c_cc[VQUIT])
tty108include/linux/tty.h#define ERASE_CHAR(tty) ((tty)->termios.c_cc[VERASE])
tty109include/linux/tty.h#define KILL_CHAR(tty) ((tty)->termios.c_cc[VKILL])
tty110include/linux/tty.h#define EOF_CHAR(tty) ((tty)->termios.c_cc[VEOF])
tty111include/linux/tty.h#define START_CHAR(tty) ((tty)->termios.c_cc[VSTART])
tty112include/linux/tty.h#define STOP_CHAR(tty) ((tty)->termios.c_cc[VSTOP])
tty113include/linux/tty.h#define SUSPEND_CHAR(tty) ((tty)->termios.c_cc[VSUSP])
tty115include/linux/tty.h#define _L_FLAG(tty,f)  ((tty)->termios.c_lflag & f)
tty116include/linux/tty.h#define _I_FLAG(tty,f)  ((tty)->termios.c_iflag & f)
tty117include/linux/tty.h#define _O_FLAG(tty,f)  ((tty)->termios.c_oflag & f)
tty119include/linux/tty.h#define L_CANON(tty)  _L_FLAG((tty),ICANON)
tty120include/linux/tty.h#define L_ISIG(tty)  _L_FLAG((tty),ISIG)
tty121include/linux/tty.h#define L_ECHO(tty)  _L_FLAG((tty),ECHO)
tty122include/linux/tty.h#define L_ECHOE(tty)  _L_FLAG((tty),ECHOE)
tty123include/linux/tty.h#define L_ECHOK(tty)  _L_FLAG((tty),ECHOK)
tty124include/linux/tty.h#define L_ECHONL(tty)  _L_FLAG((tty),ECHONL)
tty125include/linux/tty.h#define L_ECHOCTL(tty)  _L_FLAG((tty),ECHOCTL)
tty126include/linux/tty.h#define L_ECHOKE(tty)  _L_FLAG((tty),ECHOKE)
tty127include/linux/tty.h#define L_TOSTOP(tty)  _L_FLAG((tty),TOSTOP)
tty129include/linux/tty.h#define I_UCLC(tty)  _I_FLAG((tty),IUCLC)
tty130include/linux/tty.h#define I_NLCR(tty)  _I_FLAG((tty),INLCR)
tty131include/linux/tty.h#define I_CRNL(tty)  _I_FLAG((tty),ICRNL)
tty132include/linux/tty.h#define I_NOCR(tty)  _I_FLAG((tty),IGNCR)
tty133include/linux/tty.h#define I_IXON(tty)  _I_FLAG((tty),IXON)
tty134include/linux/tty.h#define I_STRP(tty)  _I_FLAG((tty),ISTRIP)
tty136include/linux/tty.h#define O_POST(tty)  _O_FLAG((tty),OPOST)
tty137include/linux/tty.h#define O_NLCR(tty)  _O_FLAG((tty),ONLCR)
tty138include/linux/tty.h#define O_CRNL(tty)  _O_FLAG((tty),OCRNL)
tty139include/linux/tty.h#define O_NLRET(tty)  _O_FLAG((tty),ONLRET)
tty140include/linux/tty.h#define O_LCUC(tty)  _O_FLAG((tty),OLCUC)
tty142include/linux/tty.h#define C_SPEED(tty)  ((tty)->termios.c_cflag & CBAUD)
tty143include/linux/tty.h#define C_HUP(tty)  (C_SPEED((tty)) == B0)
tty153include/linux/tty.hvoid (*write)(struct tty_struct * tty);
tty194include/linux/tty.h#define TTY_WRITE_FLUSH(tty) tty_write_flush((tty))
tty195include/linux/tty.h#define TTY_READ_FLUSH(tty) tty_read_flush((tty))
tty224include/linux/tty.hextern void flush_input(struct tty_struct * tty);
tty225include/linux/tty.hextern void flush_output(struct tty_struct * tty);
tty226include/linux/tty.hextern void wait_until_sent(struct tty_struct * tty);
tty227include/linux/tty.hextern void copy_to_cooked(struct tty_struct * tty);
tty232include/linux/tty.hextern int tty_signal(int sig, struct tty_struct *tty);
tty237include/linux/tty.hextern void rs_write(struct tty_struct * tty);
tty238include/linux/tty.hextern void con_write(struct tty_struct * tty);
tty239include/linux/tty.hextern void mpty_write(struct tty_struct * tty);
tty240include/linux/tty.hextern void spty_write(struct tty_struct * tty);
tty605kernel/chr_drv/console.cstatic void respond_string(char * p, int currcons, struct tty_struct * tty)
tty608kernel/chr_drv/console.cput_tty_queue(*p,tty->read_q);
tty611kernel/chr_drv/console.cTTY_READ_FLUSH(tty);
tty614kernel/chr_drv/console.cstatic void respond_num(unsigned int n, int currcons, struct tty_struct * tty)
tty624kernel/chr_drv/console.cput_tty_queue(buff[i],tty->read_q);
tty629kernel/chr_drv/console.cstatic void cursor_report(int currcons, struct tty_struct * tty)
tty631kernel/chr_drv/console.cput_tty_queue('\033', tty->read_q);
tty632kernel/chr_drv/console.cput_tty_queue('[', tty->read_q);
tty633kernel/chr_drv/console.crespond_num(y + (decom ? top+1 : 1), currcons, tty);
tty634kernel/chr_drv/console.cput_tty_queue(';', tty->read_q);
tty635kernel/chr_drv/console.crespond_num(x+1, currcons, tty);
tty636kernel/chr_drv/console.cput_tty_queue('R', tty->read_q);
tty637kernel/chr_drv/console.cTTY_READ_FLUSH(tty);
tty640kernel/chr_drv/console.cstatic inline void status_report(int currcons, struct tty_struct * tty)
tty642kernel/chr_drv/console.crespond_string("\033[0n", currcons, tty);  /* Terminal ok */
tty645kernel/chr_drv/console.cstatic inline void respond_ID(int currcons, struct tty_struct * tty)
tty647kernel/chr_drv/console.crespond_string(VT102ID, currcons, tty);
tty897kernel/chr_drv/console.cvoid con_write(struct tty_struct * tty)
tty902kernel/chr_drv/console.cwake_up(&tty->write_q->proc_list);
tty903kernel/chr_drv/console.ccurrcons = tty - tty_table;
tty908kernel/chr_drv/console.cwhile (!tty->stopped &&  (c = get_tty_queue(tty->write_q)) >= 0) {
tty993kernel/chr_drv/console.crespond_ID(currcons,tty);
tty1053kernel/chr_drv/console.cstatus_report(currcons,tty);
tty1055kernel/chr_drv/console.ccursor_report(currcons,tty);
tty1117kernel/chr_drv/console.crespond_ID(currcons,tty);
tty69kernel/chr_drv/keyboard.cstruct tty_struct * tty = TTY_TABLE(0);
tty116kernel/chr_drv/keyboard.celse if (!(krepeat && (L_ECHO(tty) || (EMPTY(tty->secondary) &&
tty117kernel/chr_drv/keyboard.cEMPTY(tty->read_q))))) {
tty25kernel/chr_drv/pty.cstruct tty_struct * tty;
tty27kernel/chr_drv/pty.ctty = tty_table + dev;
tty28kernel/chr_drv/pty.cif (!tty->link)
tty30kernel/chr_drv/pty.cwake_up(&tty->read_q->proc_list);
tty33kernel/chr_drv/pty.cwhile (!tty->link->count && !(current->signal & ~current->blocked))
tty34kernel/chr_drv/pty.cinterruptible_sleep_on(&tty->link->read_q->proc_list);
tty35kernel/chr_drv/pty.cif (!tty->link->count)
tty42kernel/chr_drv/pty.cstruct tty_struct * tty;
tty44kernel/chr_drv/pty.ctty = tty_table + dev;
tty45kernel/chr_drv/pty.cwake_up(&tty->read_q->proc_list);
tty46kernel/chr_drv/pty.cwake_up(&tty->link->write_q->proc_list);
tty48kernel/chr_drv/pty.cif (tty->link->pgrp > 0)
tty49kernel/chr_drv/pty.ckill_pg(tty->link->pgrp,SIGHUP,1);
tty78kernel/chr_drv/pty.cvoid mpty_write(struct tty_struct * tty)
tty80kernel/chr_drv/pty.cif (tty->link)
tty81kernel/chr_drv/pty.cpty_copy(tty,tty->link);
tty84kernel/chr_drv/pty.cvoid spty_write(struct tty_struct * tty)
tty86kernel/chr_drv/pty.cif (tty->link)
tty87kernel/chr_drv/pty.cpty_copy(tty,tty->link);
tty66kernel/chr_drv/serial.cstruct tty_queue * queue = info->tty->write_q;
tty69kernel/chr_drv/serial.cif (info->tty->stopped) return;
tty79kernel/chr_drv/serial.cif ((info->type != PORT_16550A) || (++i >= 14) || info->tty->stopped)
tty92kernel/chr_drv/serial.cstruct tty_queue * queue = info->tty->read_q;
tty119kernel/chr_drv/serial.cif (!(info->tty->termios.c_cflag & CLOCAL)) {
tty120kernel/chr_drv/serial.cif ((status & 0x88) == 0x08 && info->tty->pgrp > 0)
tty121kernel/chr_drv/serial.ckill_pg(info->tty->pgrp,SIGHUP,1);
tty123kernel/chr_drv/serial.cif (info->tty->termios.c_cflag & CRTSCTS)
tty124kernel/chr_drv/serial.cinfo->tty->stopped = !(status & 0x10);
tty126kernel/chr_drv/serial.cif (!info->tty->stopped)
tty142kernel/chr_drv/serial.cif (!info || !info->tty || !info->port)
tty161kernel/chr_drv/serial.cif (!info->tty || !info->port)
tty163kernel/chr_drv/serial.cif (!info->tty->write_q || EMPTY(info->tty->write_q))
tty336kernel/chr_drv/serial.ccflag = info->tty->termios.c_cflag;
tty471kernel/chr_drv/serial.cinfo->tty = (tty_table+64) + i;
tty504kernel/chr_drv/serial.cvoid rs_write(struct tty_struct * tty)
tty506kernel/chr_drv/serial.cint line = tty - tty_table - 64;
tty85kernel/chr_drv/tty_io.cvoid inline tty_write_flush(struct tty_struct * tty)
tty87kernel/chr_drv/tty_io.cif (EMPTY(tty->write_q))
tty89kernel/chr_drv/tty_io.cif (set_bit(TTY_WRITE_BUSY,&tty->flags))
tty91kernel/chr_drv/tty_io.ctty->write(tty);
tty92kernel/chr_drv/tty_io.cif (clear_bit(TTY_WRITE_BUSY,&tty->flags))
tty96kernel/chr_drv/tty_io.cvoid tty_read_flush(struct tty_struct * tty)
tty98kernel/chr_drv/tty_io.cif (EMPTY(tty->read_q))
tty100kernel/chr_drv/tty_io.cif (set_bit(TTY_READ_BUSY, &tty->flags))
tty102kernel/chr_drv/tty_io.ccopy_to_cooked(tty);
tty103kernel/chr_drv/tty_io.cif (clear_bit(TTY_READ_BUSY, &tty->flags))
tty132kernel/chr_drv/tty_io.cvoid copy_to_cooked(struct tty_struct * tty)
tty136kernel/chr_drv/tty_io.cif (!(tty && tty->write && tty->read_q &&
tty137kernel/chr_drv/tty_io.ctty->write_q && tty->secondary)) {
tty142kernel/chr_drv/tty_io.cif (FULL(tty->secondary))
tty144kernel/chr_drv/tty_io.cc = get_tty_queue(tty->read_q);
tty147kernel/chr_drv/tty_io.cif (I_STRP(tty))
tty150kernel/chr_drv/tty_io.cif (I_CRNL(tty))
tty152kernel/chr_drv/tty_io.celse if (I_NOCR(tty))
tty154kernel/chr_drv/tty_io.c} else if (c==10 && I_NLCR(tty))
tty156kernel/chr_drv/tty_io.cif (I_UCLC(tty))
tty158kernel/chr_drv/tty_io.cif (L_CANON(tty)) {
tty159kernel/chr_drv/tty_io.cif ((KILL_CHAR(tty) != __DISABLED_CHAR) &&
tty160kernel/chr_drv/tty_io.c(c==KILL_CHAR(tty))) {
tty162kernel/chr_drv/tty_io.cwhile(!(EMPTY(tty->secondary) ||
tty163kernel/chr_drv/tty_io.c(c=LAST(tty->secondary))==10 ||
tty164kernel/chr_drv/tty_io.c((EOF_CHAR(tty) != __DISABLED_CHAR) &&
tty165kernel/chr_drv/tty_io.c(c==EOF_CHAR(tty))))) {
tty166kernel/chr_drv/tty_io.cif (L_ECHO(tty)) {
tty168kernel/chr_drv/tty_io.cput_tty_queue(8,tty->write_q);
tty169kernel/chr_drv/tty_io.cput_tty_queue(' ',tty->write_q);
tty170kernel/chr_drv/tty_io.cput_tty_queue(8,tty->write_q);
tty172kernel/chr_drv/tty_io.cput_tty_queue(8,tty->write_q);
tty173kernel/chr_drv/tty_io.cput_tty_queue(' ',tty->write_q);
tty174kernel/chr_drv/tty_io.cput_tty_queue(8,tty->write_q);
tty176kernel/chr_drv/tty_io.cDEC(tty->secondary->head);
tty180kernel/chr_drv/tty_io.cif ((ERASE_CHAR(tty) != __DISABLED_CHAR) &&
tty181kernel/chr_drv/tty_io.c(c==ERASE_CHAR(tty))) {
tty182kernel/chr_drv/tty_io.cif (EMPTY(tty->secondary) ||
tty183kernel/chr_drv/tty_io.c(c=LAST(tty->secondary))==10 ||
tty184kernel/chr_drv/tty_io.c((EOF_CHAR(tty) != __DISABLED_CHAR) &&
tty185kernel/chr_drv/tty_io.c(c==EOF_CHAR(tty))))
tty187kernel/chr_drv/tty_io.cif (L_ECHO(tty)) {
tty189kernel/chr_drv/tty_io.cput_tty_queue(8,tty->write_q);
tty190kernel/chr_drv/tty_io.cput_tty_queue(' ',tty->write_q);
tty191kernel/chr_drv/tty_io.cput_tty_queue(8,tty->write_q);
tty193kernel/chr_drv/tty_io.cput_tty_queue(8,tty->write_q);
tty194kernel/chr_drv/tty_io.cput_tty_queue(32,tty->write_q);
tty195kernel/chr_drv/tty_io.cput_tty_queue(8,tty->write_q);
tty197kernel/chr_drv/tty_io.cDEC(tty->secondary->head);
tty201kernel/chr_drv/tty_io.cif (I_IXON(tty)) {
tty202kernel/chr_drv/tty_io.cif ((STOP_CHAR(tty) != __DISABLED_CHAR) &&
tty203kernel/chr_drv/tty_io.c(c==STOP_CHAR(tty))) {
tty204kernel/chr_drv/tty_io.ctty->stopped=1;
tty207kernel/chr_drv/tty_io.cif ((START_CHAR(tty) != __DISABLED_CHAR) &&
tty208kernel/chr_drv/tty_io.c(c==START_CHAR(tty))) {
tty209kernel/chr_drv/tty_io.ctty->stopped=0;
tty213kernel/chr_drv/tty_io.cif (L_ISIG(tty)) {
tty214kernel/chr_drv/tty_io.cif ((INTR_CHAR(tty) != __DISABLED_CHAR) &&
tty215kernel/chr_drv/tty_io.c(c==INTR_CHAR(tty))) {
tty216kernel/chr_drv/tty_io.ckill_pg(tty->pgrp, SIGINT, 1);
tty217kernel/chr_drv/tty_io.cflush_input(tty);
tty220kernel/chr_drv/tty_io.cif ((QUIT_CHAR(tty) != __DISABLED_CHAR) &&
tty221kernel/chr_drv/tty_io.c(c==QUIT_CHAR(tty))) {
tty222kernel/chr_drv/tty_io.ckill_pg(tty->pgrp, SIGQUIT, 1);
tty223kernel/chr_drv/tty_io.cflush_input(tty);
tty226kernel/chr_drv/tty_io.cif ((SUSPEND_CHAR(tty) != __DISABLED_CHAR) &&
tty227kernel/chr_drv/tty_io.c(c==SUSPEND_CHAR(tty))) {
tty228kernel/chr_drv/tty_io.cif (!is_orphaned_pgrp(tty->pgrp))
tty229kernel/chr_drv/tty_io.ckill_pg(tty->pgrp, SIGTSTP, 1);
tty233kernel/chr_drv/tty_io.cif (c==10 || (EOF_CHAR(tty) != __DISABLED_CHAR &&
tty234kernel/chr_drv/tty_io.cc==EOF_CHAR(tty)))
tty235kernel/chr_drv/tty_io.ctty->secondary->data++;
tty236kernel/chr_drv/tty_io.cif ((c==10) && (L_ECHO(tty) || (L_CANON(tty) && L_ECHONL(tty)))) {
tty237kernel/chr_drv/tty_io.cput_tty_queue(10,tty->write_q);
tty238kernel/chr_drv/tty_io.cput_tty_queue(13,tty->write_q);
tty239kernel/chr_drv/tty_io.c} else if (L_ECHO(tty)) {
tty240kernel/chr_drv/tty_io.cif (c<32 && L_ECHOCTL(tty)) {
tty241kernel/chr_drv/tty_io.cput_tty_queue('^',tty->write_q);
tty242kernel/chr_drv/tty_io.cput_tty_queue(c+64,tty->write_q);
tty244kernel/chr_drv/tty_io.cput_tty_queue(c,tty->write_q);
tty246kernel/chr_drv/tty_io.cput_tty_queue(c,tty->secondary);
tty248kernel/chr_drv/tty_io.cTTY_WRITE_FLUSH(tty);
tty249kernel/chr_drv/tty_io.cif (!EMPTY(tty->secondary))
tty250kernel/chr_drv/tty_io.cwake_up(&tty->secondary->proc_list);
tty251kernel/chr_drv/tty_io.cif (tty->write_q->proc_list && LEFT(tty->write_q) > TTY_BUF_SIZE/2)
tty252kernel/chr_drv/tty_io.cwake_up(&tty->write_q->proc_list);
tty276kernel/chr_drv/tty_io.cint tty_signal(int sig, struct tty_struct *tty)
tty282kernel/chr_drv/tty_io.cstatic void wait_for_canon_input(struct tty_struct * tty)
tty285kernel/chr_drv/tty_io.cTTY_READ_FLUSH(tty);
tty286kernel/chr_drv/tty_io.cif (tty->link)
tty287kernel/chr_drv/tty_io.cif (tty->link->count)
tty288kernel/chr_drv/tty_io.cTTY_WRITE_FLUSH(tty->link);
tty293kernel/chr_drv/tty_io.cif (FULL(tty->read_q))
tty295kernel/chr_drv/tty_io.cif (tty->secondary->data)
tty298kernel/chr_drv/tty_io.cif (!tty->secondary->data)
tty299kernel/chr_drv/tty_io.cinterruptible_sleep_on(&tty->secondary->proc_list);
tty306kernel/chr_drv/tty_io.cstruct tty_struct * tty;
tty313kernel/chr_drv/tty_io.ctty = TTY_TABLE(channel);
tty314kernel/chr_drv/tty_io.cif (!(tty->read_q && tty->secondary))
tty316kernel/chr_drv/tty_io.cif ((tty->pgrp > 0) &&
tty317kernel/chr_drv/tty_io.c(current->tty == channel) &&
tty318kernel/chr_drv/tty_io.c(tty->pgrp != current->pgrp))
tty322kernel/chr_drv/tty_io.creturn(tty_signal(SIGTTIN, tty));
tty323kernel/chr_drv/tty_io.cif (L_CANON(tty))
tty326kernel/chr_drv/tty_io.ctime = 10L*tty->termios.c_cc[VTIME];
tty327kernel/chr_drv/tty_io.cminimum = tty->termios.c_cc[VMIN];
tty341kernel/chr_drv/tty_io.celse if (L_CANON(tty))
tty342kernel/chr_drv/tty_io.cwait_for_canon_input(tty);
tty346kernel/chr_drv/tty_io.cTTY_READ_FLUSH(tty);
tty347kernel/chr_drv/tty_io.cif (tty->link)
tty348kernel/chr_drv/tty_io.cTTY_WRITE_FLUSH(tty->link);
tty349kernel/chr_drv/tty_io.cwhile (nr > 0 && ((c = get_tty_queue(tty->secondary)) >= 0)) {
tty350kernel/chr_drv/tty_io.cif ((EOF_CHAR(tty) != __DISABLED_CHAR &&
tty351kernel/chr_drv/tty_io.cc==EOF_CHAR(tty)) || c==10)
tty352kernel/chr_drv/tty_io.ctty->secondary->data--;
tty353kernel/chr_drv/tty_io.cif ((EOF_CHAR(tty) != __DISABLED_CHAR &&
tty354kernel/chr_drv/tty_io.cc==EOF_CHAR(tty)) && L_CANON(tty))
tty360kernel/chr_drv/tty_io.cif (c==10 && L_CANON(tty))
tty363kernel/chr_drv/tty_io.cwake_up(&tty->read_q->proc_list);
tty368kernel/chr_drv/tty_io.cif (tty->link && !tty->link->count)
tty370kernel/chr_drv/tty_io.cTTY_READ_FLUSH(tty);
tty371kernel/chr_drv/tty_io.cif (tty->link)
tty372kernel/chr_drv/tty_io.cTTY_WRITE_FLUSH(tty->link);
tty374kernel/chr_drv/tty_io.cif (EMPTY(tty->secondary))
tty375kernel/chr_drv/tty_io.cinterruptible_sleep_on(&tty->secondary->proc_list);
tty378kernel/chr_drv/tty_io.cTTY_READ_FLUSH(tty);
tty379kernel/chr_drv/tty_io.cif (tty->link && tty->link->write)
tty380kernel/chr_drv/tty_io.cTTY_WRITE_FLUSH(tty->link);
tty393kernel/chr_drv/tty_io.cstruct tty_struct * tty;
tty398kernel/chr_drv/tty_io.ctty = TTY_TABLE(channel);
tty399kernel/chr_drv/tty_io.cif (L_TOSTOP(tty) && (tty->pgrp > 0) &&
tty400kernel/chr_drv/tty_io.c(current->tty == channel) && (tty->pgrp != current->pgrp)) {
tty401kernel/chr_drv/tty_io.cif (is_orphaned_pgrp(tty->pgrp))
tty404kernel/chr_drv/tty_io.creturn tty_signal(SIGTTOU, tty);
tty410kernel/chr_drv/tty_io.cif (redirect && tty == TTY_TABLE(0))
tty411kernel/chr_drv/tty_io.ctty = redirect;
tty412kernel/chr_drv/tty_io.cif (!(tty->write_q && tty->write))
tty417kernel/chr_drv/tty_io.cif (tty->link && !tty->link->count) {
tty421kernel/chr_drv/tty_io.cif (FULL(tty->write_q)) {
tty422kernel/chr_drv/tty_io.cTTY_WRITE_FLUSH(tty);
tty424kernel/chr_drv/tty_io.cif (FULL(tty->write_q))
tty425kernel/chr_drv/tty_io.cinterruptible_sleep_on(&tty->write_q->proc_list);
tty429kernel/chr_drv/tty_io.cwhile (nr>0 && !FULL(tty->write_q)) {
tty431kernel/chr_drv/tty_io.cif (O_POST(tty)) {
tty432kernel/chr_drv/tty_io.cif (c=='\r' && O_CRNL(tty))
tty434kernel/chr_drv/tty_io.celse if (c=='\n' && O_NLRET(tty))
tty436kernel/chr_drv/tty_io.cif (c=='\n' && O_NLCR(tty) &&
tty437kernel/chr_drv/tty_io.c!set_bit(TTY_CR_PENDING,&tty->flags)) {
tty438kernel/chr_drv/tty_io.cput_tty_queue(13,tty->write_q);
tty441kernel/chr_drv/tty_io.cif (O_LCUC(tty))
tty445kernel/chr_drv/tty_io.cclear_bit(TTY_CR_PENDING,&tty->flags);
tty446kernel/chr_drv/tty_io.cput_tty_queue(c,tty->write_q);
tty451kernel/chr_drv/tty_io.cTTY_WRITE_FLUSH(tty);
tty454kernel/chr_drv/tty_io.cif (tty->link && !tty->link->count)
tty504kernel/chr_drv/tty_io.cstruct tty_struct *tty;
tty509kernel/chr_drv/tty_io.cdev = current->tty;
tty515kernel/chr_drv/tty_io.ctty = TTY_TABLE(dev);
tty516kernel/chr_drv/tty_io.cif (!tty->count && !(tty->link && tty->link->count)) {
tty517kernel/chr_drv/tty_io.cflush_input(tty);
tty518kernel/chr_drv/tty_io.cflush_output(tty);
tty519kernel/chr_drv/tty_io.ctty->stopped = 0;
tty522kernel/chr_drv/tty_io.cif (tty->count)
tty524kernel/chr_drv/tty_io.cif (tty->link)
tty525kernel/chr_drv/tty_io.ctty->link->count++;
tty527kernel/chr_drv/tty_io.ctty->count++;
tty531kernel/chr_drv/tty_io.ccurrent->tty<0 &&
tty532kernel/chr_drv/tty_io.ctty->session==0) {
tty533kernel/chr_drv/tty_io.ccurrent->tty = dev;
tty534kernel/chr_drv/tty_io.ctty->session = current->session;
tty535kernel/chr_drv/tty_io.ctty->pgrp = current->pgrp;
tty537kernel/chr_drv/tty_io.cif (IS_A_SERIAL(dev) && tty->count < 2)
tty542kernel/chr_drv/tty_io.ctty->count--;
tty543kernel/chr_drv/tty_io.cif (IS_A_PTY_MASTER(dev) && tty->link)
tty544kernel/chr_drv/tty_io.ctty->link->count--;
tty557kernel/chr_drv/tty_io.cstruct tty_struct * tty;
tty565kernel/chr_drv/tty_io.ctty = TTY_TABLE(dev);
tty566kernel/chr_drv/tty_io.cif (IS_A_PTY_MASTER(dev) && tty->link)
tty567kernel/chr_drv/tty_io.ctty->link->count--;
tty568kernel/chr_drv/tty_io.ctty->count--;
tty569kernel/chr_drv/tty_io.cif (tty->count)
tty572kernel/chr_drv/tty_io.cwait_until_sent(tty);
tty576kernel/chr_drv/tty_io.cif (!tty->count && (tty == redirect))
tty578kernel/chr_drv/tty_io.cif (tty = tty->link)
tty579kernel/chr_drv/tty_io.cif (!tty->count && (tty == redirect))
tty586kernel/chr_drv/tty_io.cstruct tty_struct * tty;
tty594kernel/chr_drv/tty_io.ctty = TTY_TABLE(dev);
tty597kernel/chr_drv/tty_io.cif (!EMPTY(tty->secondary))
tty599kernel/chr_drv/tty_io.cif (tty->link && !tty->link->count)
tty601kernel/chr_drv/tty_io.cselect_wait(&tty->secondary->proc_list, wait);
tty604kernel/chr_drv/tty_io.cif (!FULL(tty->write_q))
tty606kernel/chr_drv/tty_io.cselect_wait(&tty->write_q->proc_list, wait);
tty609kernel/chr_drv/tty_io.cif (tty->link && !tty->link->count)
tty22kernel/chr_drv/tty_ioctl.cextern int vt_ioctl(struct tty_struct *tty, int dev, int cmd, int arg);
tty34kernel/chr_drv/tty_ioctl.cvoid flush_input(struct tty_struct * tty)
tty36kernel/chr_drv/tty_ioctl.cif (tty->read_q) {
tty37kernel/chr_drv/tty_ioctl.cflush(tty->read_q);
tty38kernel/chr_drv/tty_ioctl.cwake_up(&tty->read_q->proc_list);
tty40kernel/chr_drv/tty_ioctl.cif (tty->secondary) {
tty41kernel/chr_drv/tty_ioctl.cflush(tty->secondary);
tty42kernel/chr_drv/tty_ioctl.ctty->secondary->data = 0;
tty44kernel/chr_drv/tty_ioctl.cif ((tty = tty->link) && tty->write_q) {
tty45kernel/chr_drv/tty_ioctl.cflush(tty->write_q);
tty46kernel/chr_drv/tty_ioctl.cwake_up(&tty->write_q->proc_list);
tty50kernel/chr_drv/tty_ioctl.cvoid flush_output(struct tty_struct * tty)
tty52kernel/chr_drv/tty_ioctl.cif (tty->write_q) {
tty53kernel/chr_drv/tty_ioctl.cflush(tty->write_q);
tty54kernel/chr_drv/tty_ioctl.cwake_up(&tty->write_q->proc_list);
tty56kernel/chr_drv/tty_ioctl.cif (tty = tty->link) {
tty57kernel/chr_drv/tty_ioctl.cif (tty->read_q) {
tty58kernel/chr_drv/tty_ioctl.cflush(tty->read_q);
tty59kernel/chr_drv/tty_ioctl.cwake_up(&tty->read_q->proc_list);
tty61kernel/chr_drv/tty_ioctl.cif (tty->secondary) {
tty62kernel/chr_drv/tty_ioctl.cflush(tty->secondary);
tty63kernel/chr_drv/tty_ioctl.ctty->secondary->data = 0;
tty68kernel/chr_drv/tty_ioctl.cvoid wait_until_sent(struct tty_struct * tty)
tty70kernel/chr_drv/tty_ioctl.cwhile (!(current->signal & ~current->blocked) && !EMPTY(tty->write_q)) {
tty71kernel/chr_drv/tty_ioctl.cTTY_WRITE_FLUSH(tty);
tty74kernel/chr_drv/tty_ioctl.cif (EMPTY(tty->write_q))
tty77kernel/chr_drv/tty_ioctl.cinterruptible_sleep_on(&tty->write_q->proc_list);
tty111kernel/chr_drv/tty_ioctl.cstatic int get_termios(struct tty_struct * tty, struct termios * termios)
tty117kernel/chr_drv/tty_ioctl.cput_fs_byte( ((char *)&tty->termios)[i] , i+(char *)termios );
tty121kernel/chr_drv/tty_ioctl.cstatic int set_termios(struct tty_struct * tty, struct termios * termios,
tty125kernel/chr_drv/tty_ioctl.cunsigned short old_cflag = tty->termios.c_cflag;
tty130kernel/chr_drv/tty_ioctl.cif ((current->tty == channel) &&
tty131kernel/chr_drv/tty_ioctl.c(tty->pgrp != current->pgrp)) {
tty135kernel/chr_drv/tty_ioctl.creturn tty_signal(SIGTTOU, tty);
tty138kernel/chr_drv/tty_ioctl.c((char *)&tty->termios)[i]=get_fs_byte(i+(char *)termios);
tty139kernel/chr_drv/tty_ioctl.cif (IS_A_SERIAL(channel) && tty->termios.c_cflag != old_cflag)
tty144kernel/chr_drv/tty_ioctl.cstatic int get_termio(struct tty_struct * tty, struct termio * termio)
tty150kernel/chr_drv/tty_ioctl.ctmp_termio.c_iflag = tty->termios.c_iflag;
tty151kernel/chr_drv/tty_ioctl.ctmp_termio.c_oflag = tty->termios.c_oflag;
tty152kernel/chr_drv/tty_ioctl.ctmp_termio.c_cflag = tty->termios.c_cflag;
tty153kernel/chr_drv/tty_ioctl.ctmp_termio.c_lflag = tty->termios.c_lflag;
tty154kernel/chr_drv/tty_ioctl.ctmp_termio.c_line = tty->termios.c_line;
tty156kernel/chr_drv/tty_ioctl.ctmp_termio.c_cc[i] = tty->termios.c_cc[i];
tty165kernel/chr_drv/tty_ioctl.cstatic int set_termio(struct tty_struct * tty, struct termio * termio,
tty170kernel/chr_drv/tty_ioctl.cunsigned short old_cflag = tty->termios.c_cflag;
tty172kernel/chr_drv/tty_ioctl.cif ((current->tty == channel) &&
tty173kernel/chr_drv/tty_ioctl.c(tty->pgrp > 0) &&
tty174kernel/chr_drv/tty_ioctl.c(tty->pgrp != current->pgrp)) {
tty178kernel/chr_drv/tty_ioctl.creturn tty_signal(SIGTTOU, tty);
tty182kernel/chr_drv/tty_ioctl.c*(unsigned short *)&tty->termios.c_iflag = tmp_termio.c_iflag;
tty183kernel/chr_drv/tty_ioctl.c*(unsigned short *)&tty->termios.c_oflag = tmp_termio.c_oflag;
tty184kernel/chr_drv/tty_ioctl.c*(unsigned short *)&tty->termios.c_cflag = tmp_termio.c_cflag;
tty185kernel/chr_drv/tty_ioctl.c*(unsigned short *)&tty->termios.c_lflag = tmp_termio.c_lflag;
tty186kernel/chr_drv/tty_ioctl.ctty->termios.c_line = tmp_termio.c_line;
tty188kernel/chr_drv/tty_ioctl.ctty->termios.c_cc[i] = tmp_termio.c_cc[i];
tty189kernel/chr_drv/tty_ioctl.cif (IS_A_SERIAL(channel) && tty->termios.c_cflag != old_cflag)
tty194kernel/chr_drv/tty_ioctl.cstatic int set_window_size(struct tty_struct * tty, struct winsize * ws)
tty201kernel/chr_drv/tty_ioctl.ctmp = (char *) &tty->winsize;
tty211kernel/chr_drv/tty_ioctl.ckill_pg(tty->pgrp, SIGWINCH, 1);
tty215kernel/chr_drv/tty_ioctl.cstatic int get_window_size(struct tty_struct * tty, struct winsize * ws)
tty225kernel/chr_drv/tty_ioctl.cput_fs_byte(((char *) &tty->winsize)[i], tmp);
tty232kernel/chr_drv/tty_ioctl.cstruct tty_struct * tty;
tty242kernel/chr_drv/tty_ioctl.ctty = tty_table + (dev ? ((dev < 64)? dev-1:dev) : fg_console);
tty249kernel/chr_drv/tty_ioctl.cif (!(tty->write_q && tty->read_q && tty->secondary && tty->write))
tty253kernel/chr_drv/tty_ioctl.creturn get_termios(tty,(struct termios *) arg);
tty255kernel/chr_drv/tty_ioctl.cflush_input(tty);
tty258kernel/chr_drv/tty_ioctl.cwait_until_sent(tty);
tty261kernel/chr_drv/tty_ioctl.creturn set_termios(tty,(struct termios *) arg, dev);
tty263kernel/chr_drv/tty_ioctl.creturn get_termio(tty,(struct termio *) arg);
tty265kernel/chr_drv/tty_ioctl.cflush_input(tty);
tty268kernel/chr_drv/tty_ioctl.cwait_until_sent(tty); /* fallthrough */
tty270kernel/chr_drv/tty_ioctl.creturn set_termio(tty,(struct termio *) arg, dev);
tty274kernel/chr_drv/tty_ioctl.cwait_until_sent(tty);
tty281kernel/chr_drv/tty_ioctl.ctty->stopped = 1;
tty282kernel/chr_drv/tty_ioctl.cTTY_WRITE_FLUSH(tty);
tty285kernel/chr_drv/tty_ioctl.ctty->stopped = 0;
tty286kernel/chr_drv/tty_ioctl.cTTY_WRITE_FLUSH(tty);
tty289kernel/chr_drv/tty_ioctl.cif (STOP_CHAR(tty))
tty290kernel/chr_drv/tty_ioctl.cput_tty_queue(STOP_CHAR(tty),tty->write_q);
tty293kernel/chr_drv/tty_ioctl.cif (START_CHAR(tty))
tty294kernel/chr_drv/tty_ioctl.cput_tty_queue(START_CHAR(tty),tty->write_q);
tty300kernel/chr_drv/tty_ioctl.cflush_input(tty);
tty302kernel/chr_drv/tty_ioctl.cflush_output(tty);
tty304kernel/chr_drv/tty_ioctl.cflush_input(tty);
tty305kernel/chr_drv/tty_ioctl.cflush_output(tty);
tty317kernel/chr_drv/tty_ioctl.cput_fs_long(tty->pgrp,(unsigned long *) arg);
tty320kernel/chr_drv/tty_ioctl.cif ((current->tty < 0) ||
tty321kernel/chr_drv/tty_ioctl.c(current->tty != dev) ||
tty322kernel/chr_drv/tty_ioctl.c(tty->session != current->session))
tty329kernel/chr_drv/tty_ioctl.ctty->pgrp = pgrp;      
tty333kernel/chr_drv/tty_ioctl.cput_fs_long(CHARS(tty->write_q),(unsigned long *) arg);
tty337kernel/chr_drv/tty_ioctl.cif (L_CANON(tty) && !tty->secondary->data)
tty340kernel/chr_drv/tty_ioctl.cput_fs_long(CHARS(tty->secondary),
tty346kernel/chr_drv/tty_ioctl.creturn get_window_size(tty,(struct winsize *) arg);
tty350kernel/chr_drv/tty_ioctl.creturn set_window_size(tty,(struct winsize *) arg);
tty383kernel/chr_drv/tty_ioctl.credirect = tty;
tty401kernel/chr_drv/tty_ioctl.cif (MINOR(file->f_rdev) != current->tty)
tty403kernel/chr_drv/tty_ioctl.ccurrent->tty = -1;
tty405kernel/chr_drv/tty_ioctl.cif (tty->pgrp > 0)
tty406kernel/chr_drv/tty_ioctl.ckill_pg(tty->pgrp, SIGHUP, 0);
tty407kernel/chr_drv/tty_ioctl.ctty->pgrp = -1;
tty408kernel/chr_drv/tty_ioctl.ctty->session = 0;
tty412kernel/chr_drv/tty_ioctl.creturn vt_ioctl(tty, dev, cmd, arg);
tty70kernel/chr_drv/vt.cvt_ioctl(struct tty_struct *tty, int dev, int cmd, int arg)
tty165kernel/chr_drv/vt.cflush_input(tty);
tty375kernel/exit.cstruct tty_struct *tty;
tty377kernel/exit.cif (current->tty >= 0) {
tty378kernel/exit.ctty = TTY_TABLE(current->tty);
tty379kernel/exit.cif (tty->pgrp > 0)
tty380kernel/exit.ckill_pg(tty->pgrp, SIGHUP, 1);
tty381kernel/exit.ctty->pgrp = -1;
tty382kernel/exit.ctty->session = 0;
tty386kernel/exit.c(*p)->tty = -1;
tty391kernel/sys.ccurrent->tty = -1;