diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-03-27 04:14:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:44:37 -0500 |
commit | 63ae2a94d98dd9d94163918539ec80df33f44a69 (patch) | |
tree | ebb7d6d0919fd5a8d3bac6c6a726f2f51f53f779 /arch/um/include | |
parent | d9f8b62a6b033fe7226d7c2b2efdd164ca1aa07c (diff) |
[PATCH] uml: move libc-dependent irq code to os-Linux
The serial UML OS-abstraction layer patch (um/kernel dir).
This moves all systemcalls from irq_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/include')
-rw-r--r-- | arch/um/include/irq_user.h | 15 | ||||
-rw-r--r-- | arch/um/include/misc_constants.h | 6 | ||||
-rw-r--r-- | arch/um/include/os.h | 16 |
3 files changed, 34 insertions, 3 deletions
diff --git a/arch/um/include/irq_user.h b/arch/um/include/irq_user.h index b61deb8b362a..69a93c804f0e 100644 --- a/arch/um/include/irq_user.h +++ b/arch/um/include/irq_user.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -6,6 +6,17 @@ | |||
6 | #ifndef __IRQ_USER_H__ | 6 | #ifndef __IRQ_USER_H__ |
7 | #define __IRQ_USER_H__ | 7 | #define __IRQ_USER_H__ |
8 | 8 | ||
9 | struct irq_fd { | ||
10 | struct irq_fd *next; | ||
11 | void *id; | ||
12 | int fd; | ||
13 | int type; | ||
14 | int irq; | ||
15 | int pid; | ||
16 | int events; | ||
17 | int current_events; | ||
18 | }; | ||
19 | |||
9 | enum { IRQ_READ, IRQ_WRITE }; | 20 | enum { IRQ_READ, IRQ_WRITE }; |
10 | 21 | ||
11 | extern void sigio_handler(int sig, union uml_pt_regs *regs); | 22 | extern void sigio_handler(int sig, union uml_pt_regs *regs); |
@@ -16,8 +27,6 @@ extern void reactivate_fd(int fd, int irqnum); | |||
16 | extern void deactivate_fd(int fd, int irqnum); | 27 | extern void deactivate_fd(int fd, int irqnum); |
17 | extern int deactivate_all_fds(void); | 28 | extern int deactivate_all_fds(void); |
18 | extern void forward_interrupts(int pid); | 29 | extern void forward_interrupts(int pid); |
19 | extern void init_irq_signals(int on_sigstack); | ||
20 | extern void forward_ipi(int fd, int pid); | ||
21 | extern int activate_ipi(int fd, int pid); | 30 | extern int activate_ipi(int fd, int pid); |
22 | extern unsigned long irq_lock(void); | 31 | extern unsigned long irq_lock(void); |
23 | extern void irq_unlock(unsigned long flags); | 32 | extern void irq_unlock(unsigned long flags); |
diff --git a/arch/um/include/misc_constants.h b/arch/um/include/misc_constants.h new file mode 100644 index 000000000000..989bc08de36e --- /dev/null +++ b/arch/um/include/misc_constants.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __MISC_CONSTANT_H_ | ||
2 | #define __MISC_CONSTANT_H_ | ||
3 | |||
4 | #include <user_constants.h> | ||
5 | |||
6 | #endif | ||
diff --git a/arch/um/include/os.h b/arch/um/include/os.h index 2a1c64d8d0bf..efae3e6acb5b 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include "sysdep/ptrace.h" | 12 | #include "sysdep/ptrace.h" |
13 | #include "kern_util.h" | 13 | #include "kern_util.h" |
14 | #include "skas/mm_id.h" | 14 | #include "skas/mm_id.h" |
15 | #include "irq_user.h" | ||
15 | 16 | ||
16 | #define OS_TYPE_FILE 1 | 17 | #define OS_TYPE_FILE 1 |
17 | #define OS_TYPE_DIR 2 | 18 | #define OS_TYPE_DIR 2 |
@@ -198,6 +199,8 @@ extern void os_flush_stdout(void); | |||
198 | /* tt.c | 199 | /* tt.c |
199 | * for tt mode only (will be deleted in future...) | 200 | * for tt mode only (will be deleted in future...) |
200 | */ | 201 | */ |
202 | extern void forward_ipi(int fd, int pid); | ||
203 | extern void kill_child_dead(int pid); | ||
201 | extern void stop(void); | 204 | extern void stop(void); |
202 | extern int wait_for_stop(int pid, int sig, int cont_type, void *relay); | 205 | extern int wait_for_stop(int pid, int sig, int cont_type, void *relay); |
203 | extern int protect_memory(unsigned long addr, unsigned long len, | 206 | extern int protect_memory(unsigned long addr, unsigned long len, |
@@ -294,4 +297,17 @@ extern void initial_thread_cb_skas(void (*proc)(void *), | |||
294 | extern void halt_skas(void); | 297 | extern void halt_skas(void); |
295 | extern void reboot_skas(void); | 298 | extern void reboot_skas(void); |
296 | 299 | ||
300 | /* irq.c */ | ||
301 | extern int os_waiting_for_events(struct irq_fd *active_fds); | ||
302 | extern int os_isatty(int fd); | ||
303 | extern int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds); | ||
304 | extern void os_free_irq_by_cb(int (*test)(struct irq_fd *, void *), void *arg, | ||
305 | struct irq_fd *active_fds, struct irq_fd ***last_irq_ptr2); | ||
306 | extern void os_free_irq_later(struct irq_fd *active_fds, | ||
307 | int irq, void *dev_id); | ||
308 | extern int os_get_pollfd(int i); | ||
309 | extern void os_set_pollfd(int i, int fd); | ||
310 | extern void os_set_ioignore(void); | ||
311 | extern void init_irq_signals(int on_sigstack); | ||
312 | |||
297 | #endif | 313 | #endif |