debuggers.hg

view tools/ioemu/osdep.h @ 10995:08a11694b109

[qemu] Update ioemu to qemu 0.8.2.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author chris@kneesaa.uk.xensource.com
date Mon Aug 07 18:25:30 2006 +0100 (2006-08-07)
parents b450f21472a0
children 00618037d37d
line source
1 #ifndef QEMU_OSDEP_H
2 #define QEMU_OSDEP_H
4 #include <stdarg.h>
6 int qemu_vsnprintf(char *buf, int buflen, const char *fmt, va_list args);
7 void qemu_vprintf(const char *fmt, va_list ap);
8 void qemu_printf(const char *fmt, ...);
10 void *qemu_malloc(size_t size);
11 void *qemu_mallocz(size_t size);
12 void qemu_free(void *ptr);
13 char *qemu_strdup(const char *str);
15 void *qemu_vmalloc(size_t size);
16 void qemu_vfree(void *ptr);
18 void *get_mmap_addr(unsigned long size);
20 /* specific kludges for OS compatibility (should be moved elsewhere) */
21 #if defined(__i386__) && !defined(CONFIG_SOFTMMU) && !defined(CONFIG_USER_ONLY)
23 /* disabled pthread version of longjmp which prevent us from using an
24 alternative signal stack */
25 extern void __longjmp(jmp_buf env, int val);
26 #define longjmp __longjmp
28 #include <signal.h>
30 struct siginfo;
32 /* NOTE: it works only because the glibc sigset_t is >= kernel sigset_t */
33 struct qemu_sigaction {
34 union {
35 void (*_sa_handler)(int);
36 void (*_sa_sigaction)(int, struct siginfo *, void *);
37 } _u;
38 unsigned long sa_flags;
39 void (*sa_restorer)(void);
40 sigset_t sa_mask; /* mask last for extensibility */
41 };
43 int qemu_sigaction(int signum, const struct qemu_sigaction *act,
44 struct qemu_sigaction *oldact);
46 #undef sigaction
47 #undef sa_handler
48 #undef sa_sigaction
49 #define sigaction qemu_sigaction
50 #define sa_handler _u._sa_handler
51 #define sa_sigaction _u._sa_sigaction
53 #endif
55 #endif