|
XenevaOS
|
#include <tty.h>

Public Attributes | ||
| struct kref | kref | |
| int | index | |
| struct device * | dev | |
| struct tty_driver * | driver | |
| struct tty_port * | port | |
| const struct tty_operations * | ops | |
| struct tty_ldisc * | ldisc | |
| struct ld_semaphore | ldisc_sem | |
| struct mutex | atomic_write_lock | |
| struct mutex | legacy_mutex | |
| struct mutex | throttle_mutex | |
| struct rw_semaphore | termios_rwsem | |
| struct mutex | winsize_mutex | |
| struct ktermios termios | termios_locked | |
| char | name [64] | |
| unsigned long | flags | |
| int | count | |
| unsigned int | receive_room | |
| struct winsize | winsize | |
| struct { | ||
| spinlock_t lock | ||
| bool stopped | ||
| bool tco_stopped | ||
| } | flow | |
| struct { | ||
| struct pid * pgrp | ||
| struct pid * session | ||
| spinlock_t lock | ||
| unsigned char pktstatus | ||
| bool packet | ||
| } | ctrl | |
| bool | hw_stopped | |
| bool | closing | |
| int | flow_change | |
| struct tty_struct * | link | |
| struct fasync_struct * | fasync | |
| wait_queue_head_t | write_wait | |
| wait_queue_head_t | read_wait | |
| struct work_struct | hangup_work | |
| void * | disc_data | |
| void * | driver_data | |
| spinlock_t | files_lock | |
| int | write_cnt | |
| u8 * | write_buf | |
| struct list_head | tty_files | |
| struct work_struct | SAK_work | |
struct tty_struct - state associated with a tty while open
The field comments are mainline's, abridged where the comment only restated the field name. What is worth knowing before touching this struct: count is openers, kref is references, and they are not the same number – count reaching zero cancels work and drops a kref, but the tty is freed by whoever held the last kref, which may be a different path entirely.
| struct mutex tty_struct::atomic_write_lock |
| bool tty_struct::closing |
| int tty_struct::count |
| struct { ... } tty_struct::ctrl |
| struct device* tty_struct::dev |
| void* tty_struct::disc_data |
| struct tty_driver* tty_struct::driver |
| void* tty_struct::driver_data |
| struct fasync_struct* tty_struct::fasync |
| spinlock_t tty_struct::files_lock |
| unsigned long tty_struct::flags |
| struct { ... } tty_struct::flow |
| int tty_struct::flow_change |
| struct work_struct tty_struct::hangup_work |
| bool tty_struct::hw_stopped |
| int tty_struct::index |
| struct kref tty_struct::kref |
| struct tty_ldisc* tty_struct::ldisc |
| struct ld_semaphore tty_struct::ldisc_sem |
| struct mutex tty_struct::legacy_mutex |
| struct tty_struct* tty_struct::link |
| spinlock_t tty_struct::lock |
| char tty_struct::name[64] |
| const struct tty_operations* tty_struct::ops |
| bool tty_struct::packet |
| struct pid* tty_struct::pgrp |
| unsigned char tty_struct::pktstatus |
| struct tty_port* tty_struct::port |
| wait_queue_head_t tty_struct::read_wait |
| unsigned int tty_struct::receive_room |
| struct work_struct tty_struct::SAK_work |
| struct pid* tty_struct::session |
| bool tty_struct::stopped |
| bool tty_struct::tco_stopped |
| struct rw_semaphore tty_struct::termios_rwsem |
| struct mutex tty_struct::throttle_mutex |
| struct list_head tty_struct::tty_files |
| struct winsize tty_struct::winsize |
| struct mutex tty_struct::winsize_mutex |
| u8* tty_struct::write_buf |
| int tty_struct::write_cnt |
| wait_queue_head_t tty_struct::write_wait |