diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-03-27 04:14:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:44:38 -0500 |
commit | 8e367065eea04a6fde5cb8f3854164af99c45693 (patch) | |
tree | ed43afe11ac49b992218b83a481a9e1db87160f9 /arch/um/kernel/sigio_kern.c | |
parent | 9b4f018d92dbeff9305b4cf4aa80874c3974cfcc (diff) |
[PATCH] uml: move SIGIO startup code to os-Linux/start_up.c
The serial UML OS-abstraction layer patch (um/kernel dir).
This moves all startup code from sigio_user.c file under os-Linux dir
Signed-off-by: Gennady Sharapov <Gennady.V.Sharapov@intel.com>
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/kernel/sigio_kern.c')
-rw-r--r-- | arch/um/kernel/sigio_kern.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/um/kernel/sigio_kern.c b/arch/um/kernel/sigio_kern.c index 229988463c4c..1c1300fb1e95 100644 --- a/arch/um/kernel/sigio_kern.c +++ b/arch/um/kernel/sigio_kern.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com) | 2 | * Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -12,13 +12,16 @@ | |||
12 | #include "sigio.h" | 12 | #include "sigio.h" |
13 | #include "irq_user.h" | 13 | #include "irq_user.h" |
14 | #include "irq_kern.h" | 14 | #include "irq_kern.h" |
15 | #include "os.h" | ||
15 | 16 | ||
16 | /* Protected by sigio_lock() called from write_sigio_workaround */ | 17 | /* Protected by sigio_lock() called from write_sigio_workaround */ |
17 | static int sigio_irq_fd = -1; | 18 | static int sigio_irq_fd = -1; |
18 | 19 | ||
19 | static irqreturn_t sigio_interrupt(int irq, void *data, struct pt_regs *unused) | 20 | static irqreturn_t sigio_interrupt(int irq, void *data, struct pt_regs *unused) |
20 | { | 21 | { |
21 | read_sigio_fd(sigio_irq_fd); | 22 | char c; |
23 | |||
24 | os_read_file(sigio_irq_fd, &c, sizeof(c)); | ||
22 | reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ); | 25 | reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ); |
23 | return(IRQ_HANDLED); | 26 | return(IRQ_HANDLED); |
24 | } | 27 | } |
@@ -51,6 +54,9 @@ void sigio_unlock(void) | |||
51 | spin_unlock(&sigio_spinlock); | 54 | spin_unlock(&sigio_spinlock); |
52 | } | 55 | } |
53 | 56 | ||
57 | extern void sigio_cleanup(void); | ||
58 | __uml_exitcall(sigio_cleanup); | ||
59 | |||
54 | /* | 60 | /* |
55 | * Overrides for Emacs so that we follow Linus's tabbing style. | 61 | * Overrides for Emacs so that we follow Linus's tabbing style. |
56 | * Emacs will notice this stuff at the end of the file and automatically | 62 | * Emacs will notice this stuff at the end of the file and automatically |