skas.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
  3. * Licensed under the GPL
  4. */
  5. #ifndef __SKAS_H
  6. #define __SKAS_H
  7. #include "mm_id.h"
  8. #include "sysdep/ptrace.h"
  9. extern int userspace_pid[];
  10. extern int proc_mm, ptrace_faultinfo;
  11. extern void switch_threads(void *me, void *next);
  12. extern void thread_wait(void *sw, void *fb);
  13. extern void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr,
  14. void (*handler)(int));
  15. extern int start_idle_thread(void *stack, void *switch_buf_ptr,
  16. void **fork_buf_ptr);
  17. extern int user_thread(unsigned long stack, int flags);
  18. extern void userspace(union uml_pt_regs *regs);
  19. extern void new_thread_proc(void *stack, void (*handler)(int sig));
  20. extern void remove_sigstack(void);
  21. extern void new_thread_handler(int sig);
  22. extern void handle_syscall(union uml_pt_regs *regs);
  23. extern int map(struct mm_id * mm_idp, unsigned long virt, unsigned long len,
  24. int r, int w, int x, int phys_fd, unsigned long long offset);
  25. extern int unmap(struct mm_id * mm_idp, void *addr, unsigned long len);
  26. extern int protect(struct mm_id * mm_idp, unsigned long addr,
  27. unsigned long len, int r, int w, int x);
  28. extern void user_signal(int sig, union uml_pt_regs *regs, int pid);
  29. extern int new_mm(int from);
  30. extern int start_userspace(unsigned long stub_stack);
  31. extern int copy_context_skas0(unsigned long stack, int pid);
  32. extern void get_skas_faultinfo(int pid, struct faultinfo * fi);
  33. extern long execute_syscall_skas(void *r);
  34. extern unsigned long current_stub_stack(void);
  35. #endif
  36. /*
  37. * Overrides for Emacs so that we follow Linus's tabbing style.
  38. * Emacs will notice this stuff at the end of the file and automatically
  39. * adjust the settings for this buffer only. This must remain at the end
  40. * of the file.
  41. * ---------------------------------------------------------------------------
  42. * Local variables:
  43. * c-file-style: "linux"
  44. * End:
  45. */