VirtualBox

source: vbox/trunk/src/recompiler_new/osdep.h@ 13236

最後變更 在這個檔案從13236是 13230,由 vboxsync 提交於 16 年 前

further new recompiler work

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.3 KB
 
1#ifndef QEMU_OSDEP_H
2#define QEMU_OSDEP_H
3
4#ifdef VBOX
5
6#include <iprt/alloc.h>
7#include <iprt/stdarg.h>
8#include <iprt/string.h>
9
10#define qemu_snprintf(pszBuf, cbBuf, ...) RTStrPrintf((pszBuf), (cbBuf), __VA_ARGS__)
11#define qemu_vsnprintf(pszBuf, cbBuf, pszFormat, args) \
12 RTStrPrintfV((pszBuf), (cbBuf), (pszFormat), (args))
13#define qemu_vprintf(pszFormat, args) \
14 RTLogPrintfV((pszFormat), (args))
15#define qemu_printf RTLogPrintf
16#define qemu_malloc(cb) RTMemAlloc(cb)
17#define qemu_mallocz(cb) RTMemAllocZ(cb)
18#define qemu_free(pv) RTMemFree(pv)
19#define qemu_strdup(psz) RTStrDup(psz)
20
21#define qemu_vmalloc(cb) RTMemPageAlloc(cb)
22#define qemu_vfree(pv) RTMemPageFree(pv)
23
24#ifndef NULL
25# define NULL 0
26#endif
27
28#define unlikely(cond) RT_UNLIKELY(cond)
29
30#else /* !VBOX */
31
32#include <stdarg.h>
33
34#define qemu_snprintf snprintf /* bird */
35#define qemu_vsnprintf vsnprintf /* bird */
36#define qemu_vprintf vprintf /* bird */
37
38#define qemu_printf printf
39
40void *qemu_malloc(size_t size);
41void *qemu_mallocz(size_t size);
42void qemu_free(void *ptr);
43char *qemu_strdup(const char *str);
44
45void *qemu_vmalloc(size_t size);
46void qemu_vfree(void *ptr);
47
48void *get_mmap_addr(unsigned long size);
49
50#endif /* !VBOX */
51
52#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette