aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-03-27 04:14:30 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 11:44:37 -0500
commit63ae2a94d98dd9d94163918539ec80df33f44a69 (patch)
treeebb7d6d0919fd5a8d3bac6c6a726f2f51f53f779 /arch/um/include
parentd9f8b62a6b033fe7226d7c2b2efdd164ca1aa07c (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.h15
-rw-r--r--arch/um/include/misc_constants.h6
-rw-r--r--arch/um/include/os.h16
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
9struct 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
9enum { IRQ_READ, IRQ_WRITE }; 20enum { IRQ_READ, IRQ_WRITE };
10 21
11extern void sigio_handler(int sig, union uml_pt_regs *regs); 22extern void sigio_handler(int sig, union uml_pt_regs *regs);
@@ -16,8 +27,6 @@ extern void reactivate_fd(int fd, int irqnum);
16extern void deactivate_fd(int fd, int irqnum); 27extern void deactivate_fd(int fd, int irqnum);
17extern int deactivate_all_fds(void); 28extern int deactivate_all_fds(void);
18extern void forward_interrupts(int pid); 29extern void forward_interrupts(int pid);
19extern void init_irq_signals(int on_sigstack);
20extern void forward_ipi(int fd, int pid);
21extern int activate_ipi(int fd, int pid); 30extern int activate_ipi(int fd, int pid);
22extern unsigned long irq_lock(void); 31extern unsigned long irq_lock(void);
23extern void irq_unlock(unsigned long flags); 32extern 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 */
202extern void forward_ipi(int fd, int pid);
203extern void kill_child_dead(int pid);
201extern void stop(void); 204extern void stop(void);
202extern int wait_for_stop(int pid, int sig, int cont_type, void *relay); 205extern int wait_for_stop(int pid, int sig, int cont_type, void *relay);
203extern int protect_memory(unsigned long addr, unsigned long len, 206extern int protect_memory(unsigned long addr, unsigned long len,
@@ -294,4 +297,17 @@ extern void initial_thread_cb_skas(void (*proc)(void *),
294extern void halt_skas(void); 297extern void halt_skas(void);
295extern void reboot_skas(void); 298extern void reboot_skas(void);
296 299
300/* irq.c */
301extern int os_waiting_for_events(struct irq_fd *active_fds);
302extern int os_isatty(int fd);
303extern int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds);
304extern 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);
306extern void os_free_irq_later(struct irq_fd *active_fds,
307 int irq, void *dev_id);
308extern int os_get_pollfd(int i);
309extern void os_set_pollfd(int i, int fd);
310extern void os_set_ioignore(void);
311extern void init_irq_signals(int on_sigstack);
312
297#endif 313#endif