diff options
Diffstat (limited to 'include/linux/tty.h')
| -rw-r--r-- | include/linux/tty.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index fc39db95499f..1488d8c81aac 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -185,7 +185,7 @@ struct tty_port; | |||
| 185 | struct tty_port_operations { | 185 | struct tty_port_operations { |
| 186 | /* Return 1 if the carrier is raised */ | 186 | /* Return 1 if the carrier is raised */ |
| 187 | int (*carrier_raised)(struct tty_port *port); | 187 | int (*carrier_raised)(struct tty_port *port); |
| 188 | void (*raise_dtr_rts)(struct tty_port *port); | 188 | void (*dtr_rts)(struct tty_port *port, int raise); |
| 189 | }; | 189 | }; |
| 190 | 190 | ||
| 191 | struct tty_port { | 191 | struct tty_port { |
| @@ -201,6 +201,9 @@ struct tty_port { | |||
| 201 | unsigned char *xmit_buf; /* Optional buffer */ | 201 | unsigned char *xmit_buf; /* Optional buffer */ |
| 202 | int close_delay; /* Close port delay */ | 202 | int close_delay; /* Close port delay */ |
| 203 | int closing_wait; /* Delay for output */ | 203 | int closing_wait; /* Delay for output */ |
| 204 | int drain_delay; /* Set to zero if no pure time | ||
| 205 | based drain is needed else | ||
| 206 | set to size of fifo */ | ||
| 204 | }; | 207 | }; |
| 205 | 208 | ||
| 206 | /* | 209 | /* |
| @@ -223,8 +226,11 @@ struct tty_struct { | |||
| 223 | struct tty_driver *driver; | 226 | struct tty_driver *driver; |
| 224 | const struct tty_operations *ops; | 227 | const struct tty_operations *ops; |
| 225 | int index; | 228 | int index; |
| 226 | /* The ldisc objects are protected by tty_ldisc_lock at the moment */ | 229 | |
| 227 | struct tty_ldisc ldisc; | 230 | /* Protects ldisc changes: Lock tty not pty */ |
| 231 | struct mutex ldisc_mutex; | ||
| 232 | struct tty_ldisc *ldisc; | ||
| 233 | |||
| 228 | struct mutex termios_mutex; | 234 | struct mutex termios_mutex; |
| 229 | spinlock_t ctrl_lock; | 235 | spinlock_t ctrl_lock; |
| 230 | /* Termios values are protected by the termios mutex */ | 236 | /* Termios values are protected by the termios mutex */ |
| @@ -311,6 +317,7 @@ struct tty_struct { | |||
| 311 | #define TTY_CLOSING 7 /* ->close() in progress */ | 317 | #define TTY_CLOSING 7 /* ->close() in progress */ |
| 312 | #define TTY_LDISC 9 /* Line discipline attached */ | 318 | #define TTY_LDISC 9 /* Line discipline attached */ |
| 313 | #define TTY_LDISC_CHANGING 10 /* Line discipline changing */ | 319 | #define TTY_LDISC_CHANGING 10 /* Line discipline changing */ |
| 320 | #define TTY_LDISC_OPEN 11 /* Line discipline is open */ | ||
| 314 | #define TTY_HW_COOK_OUT 14 /* Hardware can do output cooking */ | 321 | #define TTY_HW_COOK_OUT 14 /* Hardware can do output cooking */ |
| 315 | #define TTY_HW_COOK_IN 15 /* Hardware can do input cooking */ | 322 | #define TTY_HW_COOK_IN 15 /* Hardware can do input cooking */ |
| 316 | #define TTY_PTY_LOCK 16 /* pty private */ | 323 | #define TTY_PTY_LOCK 16 /* pty private */ |
| @@ -403,6 +410,7 @@ extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); | |||
| 403 | extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); | 410 | extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); |
| 404 | extern void tty_ldisc_deref(struct tty_ldisc *); | 411 | extern void tty_ldisc_deref(struct tty_ldisc *); |
| 405 | extern struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *); | 412 | extern struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *); |
| 413 | extern void tty_ldisc_hangup(struct tty_struct *tty); | ||
| 406 | extern const struct file_operations tty_ldiscs_proc_fops; | 414 | extern const struct file_operations tty_ldiscs_proc_fops; |
| 407 | 415 | ||
| 408 | extern void tty_wakeup(struct tty_struct *tty); | 416 | extern void tty_wakeup(struct tty_struct *tty); |
| @@ -425,6 +433,9 @@ extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx, | |||
| 425 | extern void tty_release_dev(struct file *filp); | 433 | extern void tty_release_dev(struct file *filp); |
| 426 | extern int tty_init_termios(struct tty_struct *tty); | 434 | extern int tty_init_termios(struct tty_struct *tty); |
| 427 | 435 | ||
| 436 | extern struct tty_struct *tty_pair_get_tty(struct tty_struct *tty); | ||
| 437 | extern struct tty_struct *tty_pair_get_pty(struct tty_struct *tty); | ||
| 438 | |||
| 428 | extern struct mutex tty_mutex; | 439 | extern struct mutex tty_mutex; |
| 429 | 440 | ||
| 430 | extern void tty_write_unlock(struct tty_struct *tty); | 441 | extern void tty_write_unlock(struct tty_struct *tty); |
| @@ -438,6 +449,7 @@ extern struct tty_struct *tty_port_tty_get(struct tty_port *port); | |||
| 438 | extern void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty); | 449 | extern void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty); |
| 439 | extern int tty_port_carrier_raised(struct tty_port *port); | 450 | extern int tty_port_carrier_raised(struct tty_port *port); |
| 440 | extern void tty_port_raise_dtr_rts(struct tty_port *port); | 451 | extern void tty_port_raise_dtr_rts(struct tty_port *port); |
| 452 | extern void tty_port_lower_dtr_rts(struct tty_port *port); | ||
| 441 | extern void tty_port_hangup(struct tty_port *port); | 453 | extern void tty_port_hangup(struct tty_port *port); |
| 442 | extern int tty_port_block_til_ready(struct tty_port *port, | 454 | extern int tty_port_block_til_ready(struct tty_port *port, |
| 443 | struct tty_struct *tty, struct file *filp); | 455 | struct tty_struct *tty, struct file *filp); |
