2004-02-16 22:12:40 +00:00
|
|
|
#ifndef QEMU_OSDEP_H
|
|
|
|
#define QEMU_OSDEP_H
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
2006-08-01 15:50:14 +00:00
|
|
|
#define qemu_printf printf
|
2004-02-16 22:12:40 +00:00
|
|
|
|
|
|
|
void *qemu_malloc(size_t size);
|
2004-03-14 21:48:47 +00:00
|
|
|
void *qemu_mallocz(size_t size);
|
2004-02-16 22:12:40 +00:00
|
|
|
void qemu_free(void *ptr);
|
2004-07-14 17:21:57 +00:00
|
|
|
char *qemu_strdup(const char *str);
|
2005-02-10 21:59:25 +00:00
|
|
|
|
|
|
|
void *qemu_vmalloc(size_t size);
|
|
|
|
void qemu_vfree(void *ptr);
|
2004-02-16 22:12:40 +00:00
|
|
|
|
|
|
|
void *get_mmap_addr(unsigned long size);
|
|
|
|
|
2007-03-25 21:33:06 +00:00
|
|
|
int qemu_create_pidfile(const char *filename);
|
|
|
|
|
2007-06-07 23:09:47 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
typedef struct {
|
|
|
|
long tv_sec;
|
|
|
|
long tv_usec;
|
|
|
|
} qemu_timeval;
|
|
|
|
int qemu_gettimeofday(qemu_timeval *tp);
|
|
|
|
#else
|
|
|
|
typedef struct timeval qemu_timeval;
|
|
|
|
#define qemu_gettimeofday(tp) gettimeofday(tp, NULL);
|
|
|
|
#endif /* !_WIN32 */
|
|
|
|
|
2004-02-16 22:12:40 +00:00
|
|
|
#endif
|