- unsigned long flags;
The current state of the tty device. This is a bitfield variable and
is accessed through the following macros:
Set when the driver has had the throttle
function called. Should not be set by a tty driver, only the tty
Set by the driver when it does not want any data to be read from or
written to the driver. If a user program attempts to do this, it
receives an -EIO error from the kernel. This is usually set as the
device is shutting down.
Used only by the pty driver to notify when the port has been closed.
Set by the tty core to indicate that a port is in exclusive mode and
can only be accessed by one user at a time.
Not used anywhere in the kernel.
If this is set, the line discipline's
write_wakeup function is allowed to be called.
This is usually called at the same time the
wake_up_interruptible function is called by the
Used only internally by the default tty line discipline.
Used by the tty core to keep track if a port is in the process of
closing at that moment in time or not.
Used by the default tty line discipline to notify the tty core that
it should not change the flip buffer when it is set.
If set by a tty driver, it notifies the line discipline that it will
"cook" the output sent to it. If it
is not set, the line discipline copies output of the driver in
chunks; otherwise, it has to evaluate every byte sent individually
for line changes. This flag should generally not be set by a tty
Almost identical to setting the
TTY_DRIVER_REAL_RAW flag in the driver flags
variable. This flag should generally not be set by a tty driver.
Used by the pty driver to lock and unlock a port.
If set, the tty core does not split up writes to the tty driver into
normal-sized chunks. This value should not be used to prevent
denial-of-service attacks on tty ports by sending large amounts of
data to a port.
- struct tty_flip_buffer flip;
The flip buffer for the tty device.
- struct tty_ldisc ldisc;
The line discipline for the tty device.
- wait_queue_head_t write_wait;
The wait_queue for the tty writing function. A
tty driver should wake this up to signal when it can receive more
- struct termios *termios;
Pointer to the current termios settings for the tty device.
- unsigned char stopped:1;
Indicates whether the tty device is stopped. The tty driver can set
- unsigned char hw_stopped:1;
Indicates whether or not the tty device's hardware
is stopped. The tty driver can set this value.
- unsigned char low_latency:1;
Indicates whether the tty device is a low-latency device, capable of
receiving data at a very high rate of speed. The tty driver can set
- unsigned char closing:1;
Indicates whether the tty device is in the middle of closing the
port. The tty driver can set this value.
- struct tty_driver driver;
The current tty_driver structure that controls
this tty device.
- void *driver_data;
A pointer that the tty_driver can use to store
data local to the tty driver. This variable is not modified by the