Statistics
| Branch: | Revision:

root / osdep.h @ f0685f6e

History | View | Annotate | Download (622 Bytes)

1
#ifndef QEMU_OSDEP_H
2
#define QEMU_OSDEP_H
3

    
4
#include <stdarg.h>
5

    
6
#define qemu_printf printf
7

    
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);
12

    
13
void *qemu_vmalloc(size_t size);
14
void qemu_vfree(void *ptr);
15

    
16
void *get_mmap_addr(unsigned long size);
17

    
18
int qemu_create_pidfile(const char *filename);
19

    
20
#ifdef _WIN32
21
typedef struct {
22
    long tv_sec;
23
    long tv_usec;
24
} qemu_timeval;
25
int qemu_gettimeofday(qemu_timeval *tp);
26
#else
27
typedef struct timeval qemu_timeval;
28
#define qemu_gettimeofday(tp) gettimeofday(tp, NULL);
29
#endif /* !_WIN32 */
30

    
31
#endif