|
AquilaOS documentation
How it works, and its code
|
A terminal, and its line discipline's state. More...
#include <tty.h>
Data Fields | |
| char * | cook |
| the line being edited, in canonical mode | |
| size_t | size |
| the size of cook | |
| size_t | pos |
| how much of cook is used | |
| int | eof |
| how many end-of-files (VEOF at the start of a line) reads still have to return | |
| size_t | col |
| the output's column (for OPOST's ONOCR and ONLRET), and whether an ONLCR newline's CR was sent but not its NL yet (the device took no more) | |
| int | nl_owed |
| struct termios | tios |
| struct winsize | ws |
| int | stopped |
| whether output is stopped (IXON: VSTOP came); writes wait on start_wait for VSTART. | |
| struct waitq | start_wait |
| int | start_waiters |
| int | gone |
| struct dev * | dev |
| the terminal's device | |
| struct session * | session |
| the session it is the controlling terminal of, or NULL | |
| struct pgroup * | fg |
| the foreground process group, or NULL | |
| struct vnode * | vnode |
| the device's vnode, which /dev/tty opens in its place | |
| void * | p |
| the device's own data | |
| ttyio | master_write |
| writes to the master side: input, as if typed | |
| ttyio | slave_write |
| writes to the slave side: output, for the device | |
| void(*) | input_flush (struct tty *tty) |
| discards the input that readers haven't read yet | |
| size_t tty::col |
the output's column (for OPOST's ONOCR and ONLRET), and whether an ONLCR newline's CR was sent but not its NL yet (the device took no more)
Definition at line 42 of file tty.h.
Referenced by tty_new(), and tty_slave_write().
| char* tty::cook |
the line being edited, in canonical mode
Definition at line 27 of file tty.h.
Referenced by tty_deliver(), tty_erase(), tty_master_write(), tty_new(), and tty_release().
| struct dev* tty::dev |
| int tty::eof |
how many end-of-files (VEOF at the start of a line) reads still have to return
Definition at line 37 of file tty.h.
Referenced by tty_can_read(), tty_eof(), tty_flush(), and tty_master_write().
| struct pgroup* tty::fg |
the foreground process group, or NULL
Definition at line 63 of file tty.h.
Referenced by pgrp_release(), tty_background(), tty_hangup(), tty_ioctl(), tty_open(), and tty_signal().
| int tty::gone |
Definition at line 54 of file tty.h.
Referenced by tty_free(), and tty_wait_start().
discards the input that readers haven't read yet
Definition at line 80 of file tty.h.
Referenced by pty_new(), tty_flush(), uart_setup(), and vt_setup().
| ttyio tty::master_write |
writes to the master side: input, as if typed
Definition at line 74 of file tty.h.
Referenced by tty_new(), tty_out(), and tty_slave_write().
| int tty::nl_owed |
Definition at line 43 of file tty.h.
Referenced by tty_new(), and tty_slave_write().
| void* tty::p |
the device's own data
Definition at line 71 of file tty.h.
Referenced by pty_input_flush(), pty_master_write(), pty_slave_write(), tty_new(), uart_input_flush(), uart_master_write(), uart_slave_write(), vt_input_flush(), vt_tty_input(), and vt_tty_output().
| size_t tty::pos |
how much of cook is used
Definition at line 33 of file tty.h.
Referenced by tty_deliver(), tty_erase(), tty_flush(), tty_master_write(), tty_new(), and tty_signal().
| struct session* tty::session |
the session it is the controlling terminal of, or NULL
Definition at line 60 of file tty.h.
Referenced by pgrp_release(), tty_background(), tty_hangup(), tty_ioctl(), tty_open(), and vt_in_use().
| size_t tty::size |
the size of cook
Definition at line 30 of file tty.h.
Referenced by tty_master_write(), and tty_new().
| ttyio tty::slave_write |
writes to the slave side: output, for the device
Definition at line 77 of file tty.h.
Referenced by tty_deliver(), tty_master_write(), and tty_new().
| struct waitq tty::start_wait |
Definition at line 52 of file tty.h.
Referenced by tty_free(), tty_ioctl(), tty_master_write(), and tty_wait_start().
| int tty::start_waiters |
Definition at line 53 of file tty.h.
Referenced by tty_free(), and tty_wait_start().
| int tty::stopped |
whether output is stopped (IXON: VSTOP came); writes wait on start_wait for VSTART.
start_waiters counts them: tty_free() marks the terminal gone and leaves freeing it to the last one
Definition at line 51 of file tty.h.
Referenced by tty_free(), tty_ioctl(), tty_master_write(), tty_wait_start(), and tty_write_iobuf().
| struct termios tty::tios |
Definition at line 45 of file tty.h.
Referenced by pts_write(), tty_eof(), tty_erase(), tty_ioctl(), tty_master_write(), tty_new(), tty_read_timeout(), tty_signal(), tty_slave_write(), uart_write(), and vt_write().
| struct vnode* tty::vnode |
the device's vnode, which /dev/tty opens in its place
Definition at line 66 of file tty.h.
Referenced by ctty_open(), pty_new(), uart_setup(), and vt_file_open().
| struct winsize tty::ws |
Definition at line 46 of file tty.h.
Referenced by tty_ioctl(), tty_new(), and vt_setup().