diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2005-05-01 08:58:56 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-01 08:58:56 -0700 |
commit | b97b77cca627b2e3e6d0015e2e14b1d1c12de0c8 (patch) | |
tree | 3fa7a55e316624a72764e5c7eead52b92a500a88 /arch/um/drivers/stdio_console.c | |
parent | 80f9507886076de0cadfdf2b87701e68156829c2 (diff) | |
download | linux-b97b77cca627b2e3e6d0015e2e14b1d1c12de0c8.tar.bz2 |
[PATCH] uml: redo console locking
Fix some console locking problems (including scheduling in atomic) and various
reorderings and cleanup in that code. Not yet ready for 2.6.12 probably.
Signed-off-by: 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/stdio_console.c')
-rw-r--r-- | arch/um/drivers/stdio_console.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c index e604d7c87695..361d0be342b3 100644 --- a/arch/um/drivers/stdio_console.c +++ b/arch/um/drivers/stdio_console.c @@ -116,8 +116,11 @@ static struct tty_operations console_ops = { .open = con_open, .close = line_close, .write = line_write, + .put_char = line_put_char, .write_room = line_write_room, .chars_in_buffer = line_chars_in_buffer, + .flush_buffer = line_flush_buffer, + .flush_chars = line_flush_chars, .set_termios = line_set_termios, .ioctl = line_ioctl, }; @@ -126,10 +129,11 @@ static void uml_console_write(struct console *console, const char *string, unsigned len) { struct line *line = &vts[console->index]; + unsigned long flags; - down(&line->sem); + spin_lock_irqsave(&line->lock, flags); console_write_chan(&line->chan_list, string, len); - up(&line->sem); + spin_unlock_irqrestore(&line->lock, flags); } static struct tty_driver *uml_console_device(struct console *c, int *index) @@ -192,14 +196,3 @@ static int console_chan_setup(char *str) } __setup("con", console_chan_setup); __channel_help(console_chan_setup, "con"); - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ |