]>
git.proxmox.com Git - qemu.git/blob - osdep.h
661e6e86ac0012760e578304b4183be5e0dc754d
6 #define qemu_printf printf
8 void *qemu_malloc(size_t size
);
9 void *qemu_mallocz(size_t size
);
10 void qemu_free(void *ptr
);
11 char *qemu_strdup(const char *str
);
13 void *qemu_vmalloc(size_t size
);
14 void qemu_vfree(void *ptr
);
16 void *get_mmap_addr(unsigned long size
);
18 /* specific kludges for OS compatibility (should be moved elsewhere) */
19 #if defined(__i386__) && !defined(CONFIG_SOFTMMU) && !defined(CONFIG_USER_ONLY)
21 /* disabled pthread version of longjmp which prevent us from using an
22 alternative signal stack */
23 extern void __longjmp(jmp_buf env
, int val
);
24 #define longjmp __longjmp
30 /* NOTE: it works only because the glibc sigset_t is >= kernel sigset_t */
31 struct qemu_sigaction
{
33 void (*_sa_handler
)(int);
34 void (*_sa_sigaction
)(int, struct siginfo
*, void *);
36 unsigned long sa_flags
;
37 void (*sa_restorer
)(void);
38 sigset_t sa_mask
; /* mask last for extensibility */
41 int qemu_sigaction(int signum
, const struct qemu_sigaction
*act
,
42 struct qemu_sigaction
*oldact
);
47 #define sigaction qemu_sigaction
48 #define sa_handler _u._sa_handler
49 #define sa_sigaction _u._sa_sigaction