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.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 97d660ed70c1..90b4fdc8a61f 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -39,10 +39,14 @@ struct tty_buffer {
39 int size; 39 int size;
40 int commit; 40 int commit;
41 int read; 41 int read;
42 int flags;
42 /* Data points here */ 43 /* Data points here */
43 unsigned long data[0]; 44 unsigned long data[0];
44}; 45};
45 46
47/* Values for .flags field of tty_buffer */
48#define TTYB_NORMAL 1 /* buffer has no flags buffer */
49
46static inline unsigned char *char_buf_ptr(struct tty_buffer *b, int ofs) 50static inline unsigned char *char_buf_ptr(struct tty_buffer *b, int ofs)
47{ 51{
48 return ((unsigned char *)b->data) + ofs; 52 return ((unsigned char *)b->data) + ofs;
@@ -60,7 +64,8 @@ struct tty_bufhead {
60 atomic_t priority; 64 atomic_t priority;
61 struct tty_buffer sentinel; 65 struct tty_buffer sentinel;
62 struct llist_head free; /* Free queue head */ 66 struct llist_head free; /* Free queue head */
63 atomic_t memory_used; /* In-use buffers excluding free list */ 67 atomic_t mem_used; /* In-use buffers excluding free list */
68 int mem_limit;
64 struct tty_buffer *tail; /* Active buffer */ 69 struct tty_buffer *tail; /* Active buffer */
65}; 70};
66/* 71/*
@@ -137,6 +142,7 @@ struct tty_bufhead {
137#define C_CLOCAL(tty) _C_FLAG((tty), CLOCAL) 142#define C_CLOCAL(tty) _C_FLAG((tty), CLOCAL)
138#define C_CIBAUD(tty) _C_FLAG((tty), CIBAUD) 143#define C_CIBAUD(tty) _C_FLAG((tty), CIBAUD)
139#define C_CRTSCTS(tty) _C_FLAG((tty), CRTSCTS) 144#define C_CRTSCTS(tty) _C_FLAG((tty), CRTSCTS)
145#define C_CMSPAR(tty) _C_FLAG((tty), CMSPAR)
140 146
141#define L_ISIG(tty) _L_FLAG((tty), ISIG) 147#define L_ISIG(tty) _L_FLAG((tty), ISIG)
142#define L_ICANON(tty) _L_FLAG((tty), ICANON) 148#define L_ICANON(tty) _L_FLAG((tty), ICANON)
@@ -422,7 +428,6 @@ extern int is_ignored(int sig);
422extern int tty_signal(int sig, struct tty_struct *tty); 428extern int tty_signal(int sig, struct tty_struct *tty);
423extern void tty_hangup(struct tty_struct *tty); 429extern void tty_hangup(struct tty_struct *tty);
424extern void tty_vhangup(struct tty_struct *tty); 430extern void tty_vhangup(struct tty_struct *tty);
425extern void tty_vhangup_locked(struct tty_struct *tty);
426extern void tty_unhangup(struct file *filp); 431extern void tty_unhangup(struct file *filp);
427extern int tty_hung_up_p(struct file *filp); 432extern int tty_hung_up_p(struct file *filp);
428extern void do_SAK(struct tty_struct *tty); 433extern void do_SAK(struct tty_struct *tty);