aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-01-06 03:18:58 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:46 -0500
commite4dcee8099802c71437a15b940f66106d9f88b2f (patch)
treeb4831639d38369fce2e20fd40730425ca702102c /arch/um/include
parent9159c9dfffe1746d58b015ceaa3b7b8e99ee9d5c (diff)
[PATCH] uml: Add throttling to console driver
This patch adds support for throttling and unthrottling input when the tty driver can't handle it. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/include')
-rw-r--r--arch/um/include/chan_kern.h2
-rw-r--r--arch/um/include/line.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/um/include/chan_kern.h b/arch/um/include/chan_kern.h
index 84d1f64f9795..1bb5e9d94270 100644
--- a/arch/um/include/chan_kern.h
+++ b/arch/um/include/chan_kern.h
@@ -38,6 +38,8 @@ extern int console_write_chan(struct list_head *chans, const char *buf,
38 int len); 38 int len);
39extern int console_open_chan(struct line *line, struct console *co, 39extern int console_open_chan(struct line *line, struct console *co,
40 struct chan_opts *opts); 40 struct chan_opts *opts);
41extern void deactivate_chan(struct list_head *chans, int irq);
42extern void reactivate_chan(struct list_head *chans, int irq);
41extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty); 43extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty);
42extern void enable_chan(struct line *line); 44extern void enable_chan(struct line *line);
43extern void close_chan(struct list_head *chans, int delay_free_irq); 45extern void close_chan(struct list_head *chans, int delay_free_irq);
diff --git a/arch/um/include/line.h b/arch/um/include/line.h
index e6cc3abfd4db..6f4d680dc1d4 100644
--- a/arch/um/include/line.h
+++ b/arch/um/include/line.h
@@ -38,6 +38,7 @@ struct line {
38 struct list_head chan_list; 38 struct list_head chan_list;
39 int valid; 39 int valid;
40 int count; 40 int count;
41 int throttled;
41 /*This lock is actually, mostly, local to*/ 42 /*This lock is actually, mostly, local to*/
42 spinlock_t lock; 43 spinlock_t lock;
43 44
@@ -60,6 +61,7 @@ struct line {
60 { init_str : str, \ 61 { init_str : str, \
61 init_pri : INIT_STATIC, \ 62 init_pri : INIT_STATIC, \
62 valid : 1, \ 63 valid : 1, \
64 throttled : 0, \
63 lock : SPIN_LOCK_UNLOCKED, \ 65 lock : SPIN_LOCK_UNLOCKED, \
64 buffer : NULL, \ 66 buffer : NULL, \
65 head : NULL, \ 67 head : NULL, \
@@ -88,6 +90,8 @@ extern void line_flush_chars(struct tty_struct *tty);
88extern int line_write_room(struct tty_struct *tty); 90extern int line_write_room(struct tty_struct *tty);
89extern int line_ioctl(struct tty_struct *tty, struct file * file, 91extern int line_ioctl(struct tty_struct *tty, struct file * file,
90 unsigned int cmd, unsigned long arg); 92 unsigned int cmd, unsigned long arg);
93extern void line_throttle(struct tty_struct *tty);
94extern void line_unthrottle(struct tty_struct *tty);
91 95
92extern char *add_xterm_umid(char *base); 96extern char *add_xterm_umid(char *base);
93extern int line_setup_irq(int fd, int input, int output, struct line *line, 97extern int line_setup_irq(int fd, int input, int output, struct line *line,