[ Pobierz całość w formacie PDF ]
.kdev_t device;Zakodowany numer (glowny i drugorzedny) urzadzeniaunsigned long flags;int count;/* Ilosc wykonanych funkcji open na tym terminalu - jest to wazne abysmywiedzieli kiedy wykonac tty_close(.) zwalniajce pamiec i resteujaceurzadzenie itp.*/struct winsize winsize;unsigned char stopped:1, hw_stopped:1, packet:1;unsigned char ctrl_status;struct tty_struct *link;/* Uzywane jedynie dla pseudoterminali, wskazuje na drugi element pary */struct fasync_struct *fasync;struct tty_flip_buffer flip;/* Wskaznik do bufora "sprzetowgo", tzn tutaj procedura sterownika umieszczasurowe dane, ktore beda jeszcze przetworzone przez dyscypline lini(bedzie o tym powiedziane dalej).int max_flip_cnt;struct wait_queue *write_wait;struct wait_queue *read_wait;/* Kolejki procesow czekajacych na zapis/odczyt do/z terminala */void *disc_data;void *driver_data;#define N_TTY_BUF_SIZE 4096/* W tym miejscy znajduje sie komentarz " z powodow historycznych w strukturzetty trzymamy prywatne dane dyscypliny linii" */unsigned int column;unsigned char lnext:1, erasing:1, raw:1, real_raw:1, icanon:1;unsigned char closing:1;unsigned short minimum_to_wake;unsigned overrun_time;int num_overrun;unsigned long process_char_map[256/(8*sizeof(unsigned long))];char *read_buf;int read_head;int read_tail;int read_cnt;unsigned long read_flags[N_TTY_BUF_SIZE/(8*sizeof(unsigned long))];int canon_data;unsigned long canon_head;unsigned int canon_column;};/* tty magic number */#define TTY_MAGIC 0x5401#define TTY_THROTTLED 0#define TTY_IO_ERROR 1#define TTY_OTHER_CLOSED 2#define TTY_EXCLUSIVE 3#define TTY_DEBUG 4#define TTY_DO_WRITE_WAKEUP 5#define TTY_PUSH 6#define TTY_CLOSING 7#define TTY_WRITE_FLUSH(tty) tty_write_flush((tty))extern void tty_write_flush(struct tty_struct *);extern struct termios tty_std_termios;extern struct tty_struct * redirect;extern struct tty_ldisc ldiscs[];extern int fg_console, last_console, want_console;extern int kmsg_redirect;extern struct wait_queue * keypress_wait;extern unsigned long con_init(unsigned long);extern int rs_init(void);extern int lp_init(void);extern int pty_init(void);extern int tty_init(void);extern int pcxe_init(void);extern int vcs_init(void);extern int cy_init(void);extern int stl_init(void);extern int stli_init(void);extern int riscom8_init(void);extern int baycom_init(void);extern int tty_paranoia_check(struct tty_struct *tty, kdev_t device,const char *routine);extern char *_tty_name(struct tty_struct *tty, char *buf);extern char *tty_name(struct tty_struct *tty);extern void tty_wait_until_sent(struct tty_struct * tty, int timeout);extern int tty_check_change(struct tty_struct * tty);extern void stop_tty(struct tty_struct * tty);extern void start_tty(struct tty_struct * tty);extern int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc);extern int tty_register_driver(struct tty_driver *driver);extern int tty_unregister_driver(struct tty_driver *driver);extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp,int buflen);extern void tty_write_message(struct tty_struct *tty, char *msg);extern int is_orphaned_pgrp(int pgrp);extern int is_ignored(int sig);extern int tty_signal(int sig, struct tty_struct *tty);extern void tty_hangup(struct tty_struct * tty);extern void tty_vhangup(struct tty_struct * tty);extern void tty_unhangup(struct file *filp);extern int tty_hung_up_p(struct file * filp);extern void do_SAK(struct tty_struct *tty);extern void disassociate_ctty(int priv);/* n_tty.c */extern struct tty_ldisc tty_ldisc_N_TTY;/* tty_ioctl.c */extern int n_tty_ioctl(struct tty_struct * tty, struct file * file,unsigned int cmd, unsigned long arg);/* serial.c */extern int rs_open(struct tty_struct * tty, struct file * filp);/* pty.c */extern int pty_open(struct tty_struct * tty, struct file * filp);extern int pcxe_open(struct tty_struct *tty, struct file *filp);/* console.c */extern int con_open(struct tty_struct * tty, struct file * filp);extern void update_screen(int new_console);extern void console_print(const char *);/* vt.c */extern int vt_ioctl(struct tty_struct *tty, struct file * file,unsigned int cmd, unsigned long arg);#endif /* __KERNEL__ */#endif
[ Pobierz całość w formacie PDF ]