aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tty.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r--include/linux/tty.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index cb35ca50a0a..ea4c2605f8d 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -5,16 +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/*
9 * These constants are also useful for user-level apps (e.g., VC
10 * resizing).
11 */
12#define MIN_NR_CONSOLES 1 /* must be at least 1 */
13#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */
14#define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */
15 /* Note: the ioctl VT_GETSTATE does not work for
16 consoles 16 and higher (since it returns a short) */
17
18#ifdef __KERNEL__ 8#ifdef __KERNEL__
19#include <linux/fs.h> 9#include <linux/fs.h>
20#include <linux/major.h> 10#include <linux/major.h>
@@ -22,7 +12,6 @@
22#include <linux/workqueue.h> 12#include <linux/workqueue.h>
23#include <linux/tty_driver.h> 13#include <linux/tty_driver.h>
24#include <linux/tty_ldisc.h> 14#include <linux/tty_ldisc.h>
25#include <linux/screen_info.h>
26#include <linux/mutex.h> 15#include <linux/mutex.h>
27 16
28#include <asm/system.h> 17#include <asm/system.h>
@@ -57,7 +46,6 @@ struct tty_buffer {
57 unsigned char *flag_buf_ptr; 46 unsigned char *flag_buf_ptr;
58 int used; 47 int used;
59 int size; 48 int size;
60 int active;
61 int commit; 49 int commit;
62 int read; 50 int read;
63 /* Data points here */ 51 /* Data points here */
@@ -71,6 +59,7 @@ struct tty_bufhead {
71 struct tty_buffer *head; /* Queue head */ 59 struct tty_buffer *head; /* Queue head */
72 struct tty_buffer *tail; /* Active buffer */ 60 struct tty_buffer *tail; /* Active buffer */
73 struct tty_buffer *free; /* Free queue head */ 61 struct tty_buffer *free; /* Free queue head */
62 int memory_used; /* Buffer space used excluding free queue */
74}; 63};
75/* 64/*
76 * The pty uses char_buf and flag_buf as a contiguous buffer 65 * The pty uses char_buf and flag_buf as a contiguous buffer
@@ -185,7 +174,7 @@ struct tty_struct {
185 struct tty_driver *driver; 174 struct tty_driver *driver;
186 int index; 175 int index;
187 struct tty_ldisc ldisc; 176 struct tty_ldisc ldisc;
188 struct semaphore termios_sem; 177 struct mutex termios_mutex;
189 struct termios *termios, *termios_locked; 178 struct termios *termios, *termios_locked;
190 char name[64]; 179 char name[64];
191 int pgrp; 180 int pgrp;
@@ -201,7 +190,6 @@ struct tty_struct {
201 struct tty_struct *link; 190 struct tty_struct *link;
202 struct fasync_struct *fasync; 191 struct fasync_struct *fasync;
203 struct tty_bufhead buf; 192 struct tty_bufhead buf;
204 int max_flip_cnt;
205 int alt_speed; /* For magic substitution of 38400 bps */ 193 int alt_speed; /* For magic substitution of 38400 bps */
206 wait_queue_head_t write_wait; 194 wait_queue_head_t write_wait;
207 wait_queue_head_t read_wait; 195 wait_queue_head_t read_wait;
@@ -259,7 +247,6 @@ struct tty_struct {
259#define TTY_DO_WRITE_WAKEUP 5 /* Call write_wakeup after queuing new */ 247#define TTY_DO_WRITE_WAKEUP 5 /* Call write_wakeup after queuing new */
260#define TTY_PUSH 6 /* n_tty private */ 248#define TTY_PUSH 6 /* n_tty private */
261#define TTY_CLOSING 7 /* ->close() in progress */ 249#define TTY_CLOSING 7 /* ->close() in progress */
262#define TTY_DONT_FLIP 8 /* Defer buffer flip */
263#define TTY_LDISC 9 /* Line discipline attached */ 250#define TTY_LDISC 9 /* Line discipline attached */
264#define TTY_HW_COOK_OUT 14 /* Hardware can do output cooking */ 251#define TTY_HW_COOK_OUT 14 /* Hardware can do output cooking */
265#define TTY_HW_COOK_IN 15 /* Hardware can do input cooking */ 252#define TTY_HW_COOK_IN 15 /* Hardware can do input cooking */
@@ -272,7 +259,6 @@ struct tty_struct {
272extern void tty_write_flush(struct tty_struct *); 259extern void tty_write_flush(struct tty_struct *);
273 260
274extern struct termios tty_std_termios; 261extern struct termios tty_std_termios;
275extern int fg_console, last_console, want_console;
276 262
277extern int kmsg_redirect; 263extern int kmsg_redirect;
278 264