]>
Commit | Line | Data |
---|---|---|
dd0029c0 JS |
1 | #ifndef __libqos_h |
2 | #define __libqos_h | |
3 | ||
4 | #include "libqtest.h" | |
5 | #include "libqos/pci.h" | |
6 | #include "libqos/malloc-pc.h" | |
7 | ||
8 | typedef struct QOSState { | |
9 | QTestState *qts; | |
10 | QGuestAllocator *alloc; | |
11 | } QOSState; | |
12 | ||
13 | QOSState *qtest_boot(const char *cmdline_fmt, ...); | |
14 | void qtest_shutdown(QOSState *qs); | |
15 | ||
16 | static inline uint64_t qmalloc(QOSState *q, size_t bytes) | |
17 | { | |
18 | return guest_alloc(q->alloc, bytes); | |
19 | } | |
20 | ||
21 | static inline void qfree(QOSState *q, uint64_t addr) | |
22 | { | |
23 | guest_free(q->alloc, addr); | |
24 | } | |
25 | ||
26 | #endif |