diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-01-06 09:18:58 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 17:33:46 +0100 |
commit | e4dcee8099802c71437a15b940f66106d9f88b2f (patch) | |
tree | b4831639d38369fce2e20fd40730425ca702102c /arch/um/drivers/chan_kern.c | |
parent | [PATCH] uml: Fix flip_buf full handling (diff) | |
download | linux-e4dcee8099802c71437a15b940f66106d9f88b2f.tar.xz linux-e4dcee8099802c71437a15b940f66106d9f88b2f.zip |
[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/drivers/chan_kern.c')
-rw-r--r-- | arch/um/drivers/chan_kern.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c index 36df55ad64c2..cd13b91b9ff6 100644 --- a/arch/um/drivers/chan_kern.c +++ b/arch/um/drivers/chan_kern.c @@ -312,6 +312,32 @@ void close_chan(struct list_head *chans, int delay_free_irq) } } +void deactivate_chan(struct list_head *chans, int irq) +{ + struct list_head *ele; + + struct chan *chan; + list_for_each(ele, chans) { + chan = list_entry(ele, struct chan, list); + + if(chan->enabled && chan->input) + deactivate_fd(chan->fd, irq); + } +} + +void reactivate_chan(struct list_head *chans, int irq) +{ + struct list_head *ele; + struct chan *chan; + + list_for_each(ele, chans) { + chan = list_entry(ele, struct chan, list); + + if(chan->enabled && chan->input) + reactivate_fd(chan->fd, irq); + } +} + int write_chan(struct list_head *chans, const char *buf, int len, int write_irq) { |