]> err.no Git - linux-2.6/blobdiff - arch/um/include/os.h
[PATCH] uml: move libc-dependent code from trap_user.c
[linux-2.6] / arch / um / include / os.h
index 6f766e1faeccd1bd806ddeb09546002c7e898d31..dd72d66cf0ed18457361f0b004d02c2d1136f5c4 100644 (file)
@@ -6,8 +6,11 @@
 #ifndef __OS_H__
 #define __OS_H__
 
+#include "uml-config.h"
 #include "asm/types.h"
 #include "../os/include/file.h"
+#include "sysdep/ptrace.h"
+#include "kern_util.h"
 
 #define OS_TYPE_FILE 1 
 #define OS_TYPE_DIR 2 
@@ -159,10 +162,14 @@ extern int can_do_skas(void);
 
 /* Make sure they are clear when running in TT mode. Required by
  * SEGV_MAYBE_FIXABLE */
+#ifdef UML_CONFIG_MODE_SKAS
 #define clear_can_do_skas() do { ptrace_faultinfo = proc_mm = 0; } while (0)
+#else
+#define clear_can_do_skas() do {} while (0)
+#endif
 
 /* mem.c */
-extern int create_mem_file(unsigned long len);
+extern int create_mem_file(unsigned long long len);
 
 /* process.c */
 extern unsigned long os_process_pc(int pid);
@@ -194,15 +201,38 @@ extern void forward_pending_sigio(int target);
 extern int start_fork_tramp(void *arg, unsigned long temp_stack,
                            int clone_flags, int (*tramp)(void *));
 
-#endif
+/* uaccess.c */
+extern unsigned long __do_user_copy(void *to, const void *from, int n,
+                                   void **fault_addr, void **fault_catcher,
+                                   void (*op)(void *to, const void *from,
+                                              int n), int *faulted_out);
+
+/* helper.c */
+extern int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv,
+                     unsigned long *stack_out);
+extern int run_helper_thread(int (*proc)(void *), void *arg,
+                            unsigned int flags, unsigned long *stack_out,
+                            int stack_order);
+extern int helper_wait(int pid);
+
+/* umid.c */
+
+extern int umid_file_name(char *name, char *buf, int len);
+extern int set_umid(char *name);
+extern char *get_umid(void);
+
+/* signal.c */
+extern void set_sigstack(void *sig_stack, int size);
+extern void remove_sigstack(void);
+extern void set_handler(int sig, void (*handler)(int), int flags, ...);
+extern int change_sig(int signal, int on);
+extern void block_signals(void);
+extern void unblock_signals(void);
+extern int get_signals(void);
+extern int set_signals(int enable);
+
+/* trap.c */
+extern void os_fill_handlinfo(struct kern_handlers h);
+extern void do_longjmp(void *p, int val);
 
-/*
- * 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:
- */
+#endif