diff options
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r-- | include/linux/tty.h | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index d6f05292e45..969daca2107 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -5,24 +5,6 @@ | |||
5 | * 'tty.h' defines some structures used by tty_io.c and some defines. | 5 | * 'tty.h' defines some structures used by tty_io.c and some defines. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifdef __KERNEL__ | ||
9 | #include <linux/fs.h> | ||
10 | #include <linux/major.h> | ||
11 | #include <linux/termios.h> | ||
12 | #include <linux/workqueue.h> | ||
13 | #include <linux/tty_driver.h> | ||
14 | #include <linux/tty_ldisc.h> | ||
15 | #include <linux/mutex.h> | ||
16 | |||
17 | #include <asm/system.h> | ||
18 | |||
19 | |||
20 | /* | ||
21 | * (Note: the *_driver.minor_start values 1, 64, 128, 192 are | ||
22 | * hardcoded at present.) | ||
23 | */ | ||
24 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ | ||
25 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ | ||
26 | #define NR_LDISCS 30 | 8 | #define NR_LDISCS 30 |
27 | 9 | ||
28 | /* line disciplines */ | 10 | /* line disciplines */ |
@@ -53,6 +35,25 @@ | |||
53 | #define N_TRACESINK 23 /* Trace data routing for MIPI P1149.7 */ | 35 | #define N_TRACESINK 23 /* Trace data routing for MIPI P1149.7 */ |
54 | #define N_TRACEROUTER 24 /* Trace data routing for MIPI P1149.7 */ | 36 | #define N_TRACEROUTER 24 /* Trace data routing for MIPI P1149.7 */ |
55 | 37 | ||
38 | #ifdef __KERNEL__ | ||
39 | #include <linux/fs.h> | ||
40 | #include <linux/major.h> | ||
41 | #include <linux/termios.h> | ||
42 | #include <linux/workqueue.h> | ||
43 | #include <linux/tty_driver.h> | ||
44 | #include <linux/tty_ldisc.h> | ||
45 | #include <linux/mutex.h> | ||
46 | |||
47 | #include <asm/system.h> | ||
48 | |||
49 | |||
50 | /* | ||
51 | * (Note: the *_driver.minor_start values 1, 64, 128, 192 are | ||
52 | * hardcoded at present.) | ||
53 | */ | ||
54 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ | ||
55 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ | ||
56 | |||
56 | /* | 57 | /* |
57 | * This character is the same as _POSIX_VDISABLE: it cannot be used as | 58 | * This character is the same as _POSIX_VDISABLE: it cannot be used as |
58 | * a c_cc[] character, but indicates that a particular special character | 59 | * a c_cc[] character, but indicates that a particular special character |
@@ -294,7 +295,7 @@ struct tty_struct { | |||
294 | void *driver_data; | 295 | void *driver_data; |
295 | struct list_head tty_files; | 296 | struct list_head tty_files; |
296 | 297 | ||
297 | #define N_TTY_BUF_SIZE 4096 | 298 | #define N_TTY_BUF_SIZE 32768 |
298 | 299 | ||
299 | /* | 300 | /* |
300 | * The following is data for the N_TTY line discipline. For | 301 | * The following is data for the N_TTY line discipline. For |
@@ -420,6 +421,8 @@ extern void tty_driver_flush_buffer(struct tty_struct *tty); | |||
420 | extern void tty_throttle(struct tty_struct *tty); | 421 | extern void tty_throttle(struct tty_struct *tty); |
421 | extern void tty_unthrottle(struct tty_struct *tty); | 422 | extern void tty_unthrottle(struct tty_struct *tty); |
422 | extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws); | 423 | extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws); |
424 | extern void tty_driver_remove_tty(struct tty_driver *driver, | ||
425 | struct tty_struct *tty); | ||
423 | extern void tty_shutdown(struct tty_struct *tty); | 426 | extern void tty_shutdown(struct tty_struct *tty); |
424 | extern void tty_free_termios(struct tty_struct *tty); | 427 | extern void tty_free_termios(struct tty_struct *tty); |
425 | extern int is_current_pgrp_orphaned(void); | 428 | extern int is_current_pgrp_orphaned(void); |
@@ -470,7 +473,9 @@ extern void proc_clear_tty(struct task_struct *p); | |||
470 | extern struct tty_struct *get_current_tty(void); | 473 | extern struct tty_struct *get_current_tty(void); |
471 | extern void tty_default_fops(struct file_operations *fops); | 474 | extern void tty_default_fops(struct file_operations *fops); |
472 | extern struct tty_struct *alloc_tty_struct(void); | 475 | extern struct tty_struct *alloc_tty_struct(void); |
473 | extern int tty_add_file(struct tty_struct *tty, struct file *file); | 476 | extern int tty_alloc_file(struct file *file); |
477 | extern void tty_add_file(struct tty_struct *tty, struct file *file); | ||
478 | extern void tty_free_file(struct file *file); | ||
474 | extern void free_tty_struct(struct tty_struct *tty); | 479 | extern void free_tty_struct(struct tty_struct *tty); |
475 | extern void initialize_tty_struct(struct tty_struct *tty, | 480 | extern void initialize_tty_struct(struct tty_struct *tty, |
476 | struct tty_driver *driver, int idx); | 481 | struct tty_driver *driver, int idx); |