]> git.proxmox.com Git - mirror_qemu.git/blob - linux-user/qemu.h
basic signal handling
[mirror_qemu.git] / linux-user / qemu.h
1 #ifndef GEMU_H
2 #define GEMU_H
3
4 #include "thunk.h"
5
6 #ifdef TARGET_I386
7
8 /* default linux values for the selectors */
9 #define __USER_CS (0x23)
10 #define __USER_DS (0x2B)
11
12 struct target_pt_regs {
13 long ebx;
14 long ecx;
15 long edx;
16 long esi;
17 long edi;
18 long ebp;
19 long eax;
20 int xds;
21 int xes;
22 long orig_eax;
23 long eip;
24 int xcs;
25 long eflags;
26 long esp;
27 int xss;
28 };
29
30 #endif
31
32 /* This struct is used to hold certain information about the image.
33 * Basically, it replicates in user space what would be certain
34 * task_struct fields in the kernel
35 */
36 struct image_info {
37 unsigned long start_code;
38 unsigned long end_code;
39 unsigned long end_data;
40 unsigned long start_brk;
41 unsigned long brk;
42 unsigned long start_mmap;
43 unsigned long mmap;
44 unsigned long rss;
45 unsigned long start_stack;
46 unsigned long arg_start;
47 unsigned long arg_end;
48 unsigned long env_start;
49 unsigned long env_end;
50 unsigned long entry;
51 int personality;
52 };
53
54 int elf_exec(const char * filename, char ** argv, char ** envp,
55 struct target_pt_regs * regs, struct image_info *infop);
56
57 void target_set_brk(char *new_brk);
58 void syscall_init(void);
59 long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
60 long arg4, long arg5, long arg6);
61 void gemu_log(const char *fmt, ...) __attribute__((format(printf,1,2)));
62 struct CPUX86State;
63 void cpu_loop(struct CPUX86State *env);
64 void process_pending_signals(void *cpu_env);
65 void signal_init(void);
66
67 #endif