ia64/xen-unstable

view tools/ioemu/osdep.h @ 8740:3d7ea7972b39

Update patches for linux 2.6.15.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Thu Feb 02 17:16:00 2006 +0000 (2006-02-02)
parents 8e5fc5fe636c
children f7b43e5c42b9
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 *get_mmap_addr(unsigned long size);
17 /* specific kludges for OS compatibility (should be moved elsewhere) */
18 #if defined(__i386__) && !defined(CONFIG_SOFTMMU) && !defined(CONFIG_USER_ONLY)
20 /* disabled pthread version of longjmp which prevent us from using an
21 alternative signal stack */
22 extern void __longjmp(jmp_buf env, int val);
23 #define longjmp __longjmp
25 #include <signal.h>
27 /* NOTE: it works only because the glibc sigset_t is >= kernel sigset_t */
28 struct qemu_sigaction {
29 union {
30 void (*_sa_handler)(int);
31 void (*_sa_sigaction)(int, struct siginfo *, void *);
32 } _u;
33 unsigned long sa_flags;
34 void (*sa_restorer)(void);
35 sigset_t sa_mask; /* mask last for extensibility */
36 };
38 int qemu_sigaction(int signum, const struct qemu_sigaction *act,
39 struct qemu_sigaction *oldact);
41 #undef sigaction
42 #undef sa_handler
43 #undef sa_sigaction
44 #define sigaction qemu_sigaction
45 #define sa_handler _u._sa_handler
46 #define sa_sigaction _u._sa_sigaction
48 #endif
50 #endif