root / osdep.h @ 40d0591e
History | View | Annotate | Download (622 Bytes)
1 | ea88812f | bellard | #ifndef QEMU_OSDEP_H
|
---|---|---|---|
2 | ea88812f | bellard | #define QEMU_OSDEP_H
|
3 | ea88812f | bellard | |
4 | ea88812f | bellard | #include <stdarg.h> |
5 | ea88812f | bellard | |
6 | d62ca2bb | bellard | #define qemu_printf printf
|
7 | ea88812f | bellard | |
8 | ea88812f | bellard | void *qemu_malloc(size_t size);
|
9 | 0fb48229 | bellard | void *qemu_mallocz(size_t size);
|
10 | ea88812f | bellard | void qemu_free(void *ptr); |
11 | 2571929a | bellard | char *qemu_strdup(const char *str); |
12 | 49b470eb | bellard | |
13 | 49b470eb | bellard | void *qemu_vmalloc(size_t size);
|
14 | 49b470eb | bellard | void qemu_vfree(void *ptr); |
15 | ea88812f | bellard | |
16 | ea88812f | bellard | void *get_mmap_addr(unsigned long size); |
17 | ea88812f | bellard | |
18 | aa26bb2d | ths | int qemu_create_pidfile(const char *filename); |
19 | aa26bb2d | ths | |
20 | 29b3a662 | pbrook | #ifdef _WIN32
|
21 | 29b3a662 | pbrook | typedef struct { |
22 | 29b3a662 | pbrook | long tv_sec;
|
23 | 29b3a662 | pbrook | long tv_usec;
|
24 | 29b3a662 | pbrook | } qemu_timeval; |
25 | 29b3a662 | pbrook | int qemu_gettimeofday(qemu_timeval *tp);
|
26 | 29b3a662 | pbrook | #else
|
27 | 29b3a662 | pbrook | typedef struct timeval qemu_timeval; |
28 | 29b3a662 | pbrook | #define qemu_gettimeofday(tp) gettimeofday(tp, NULL); |
29 | 29b3a662 | pbrook | #endif /* !_WIN32 */ |
30 | 29b3a662 | pbrook | |
31 | ea88812f | bellard | #endif |