aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include/user_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/include/user_util.h')
-rw-r--r--arch/um/include/user_util.h106
1 files changed, 106 insertions, 0 deletions
diff --git a/arch/um/include/user_util.h b/arch/um/include/user_util.h
new file mode 100644
index 000000000000..103cd320386c
--- /dev/null
+++ b/arch/um/include/user_util.h
@@ -0,0 +1,106 @@
1/*
2 * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __USER_UTIL_H__
7#define __USER_UTIL_H__
8
9#include "sysdep/ptrace.h"
10
11#define CATCH_EINTR(expr) while ((errno = 0, ((expr) < 0)) && (errno == EINTR))
12
13extern int mode_tt;
14
15extern int grantpt(int __fd);
16extern int unlockpt(int __fd);
17extern char *ptsname(int __fd);
18
19struct cpu_task {
20 int pid;
21 void *task;
22};
23
24extern struct cpu_task cpu_tasks[];
25
26struct signal_info {
27 void (*handler)(int, union uml_pt_regs *);
28 int is_irq;
29};
30
31extern struct signal_info sig_info[];
32
33extern unsigned long low_physmem;
34extern unsigned long high_physmem;
35extern unsigned long uml_physmem;
36extern unsigned long uml_reserved;
37extern unsigned long end_vm;
38extern unsigned long start_vm;
39extern unsigned long highmem;
40
41extern char host_info[];
42
43extern char saved_command_line[];
44extern char command_line[];
45
46extern char *tempdir;
47
48extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end;
49extern unsigned long _unprotected_end;
50extern unsigned long brk_start;
51
52extern int pty_output_sigio;
53extern int pty_close_sigio;
54
55extern void stop(void);
56extern void stack_protections(unsigned long address);
57extern void task_protections(unsigned long address);
58extern int wait_for_stop(int pid, int sig, int cont_type, void *relay);
59extern void *add_signal_handler(int sig, void (*handler)(int));
60extern int start_fork_tramp(void *arg, unsigned long temp_stack,
61 int clone_flags, int (*tramp)(void *));
62extern int linux_main(int argc, char **argv);
63extern void set_cmdline(char *cmd);
64extern void input_cb(void (*proc)(void *), void *arg, int arg_len);
65extern int get_pty(void);
66extern void *um_kmalloc(int size);
67extern int switcheroo(int fd, int prot, void *from, void *to, int size);
68extern void setup_machinename(char *machine_out);
69extern void setup_hostinfo(void);
70extern void add_arg(char *arg);
71extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int));
72extern void init_new_thread_signals(int altstack);
73extern void do_exec(int old_pid, int new_pid);
74extern void tracer_panic(char *msg, ...);
75extern char *get_umid(int only_if_set);
76extern void do_longjmp(void *p, int val);
77extern int detach(int pid, int sig);
78extern int attach(int pid);
79extern void kill_child_dead(int pid);
80extern int cont(int pid);
81extern void check_ptrace(void);
82extern void check_sigio(void);
83extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr);
84extern void write_sigio_workaround(void);
85extern void arch_check_bugs(void);
86extern int cpu_feature(char *what, char *buf, int len);
87extern int arch_handle_signal(int sig, union uml_pt_regs *regs);
88extern int arch_fixup(unsigned long address, void *sc_ptr);
89extern void forward_pending_sigio(int target);
90extern int can_do_skas(void);
91extern void arch_init_thread(void);
92extern int setjmp_wrapper(void (*proc)(void *, void *), ...);
93extern int raw(int fd);
94
95#endif
96
97/*
98 * Overrides for Emacs so that we follow Linus's tabbing style.
99 * Emacs will notice this stuff at the end of the file and automatically
100 * adjust the settings for this buffer only. This must remain at the end
101 * of the file.
102 * ---------------------------------------------------------------------------
103 * Local variables:
104 * c-file-style: "linux"
105 * End:
106 */