version 1.1.1.10, 2018/04/24 19:17:10
|
version 1.1.1.11, 2018/04/24 19:34:21
|
Line 61 typedef struct Monitor Monitor;
|
Line 61 typedef struct Monitor Monitor;
|
#if !defined(ENOTSUP) |
#if !defined(ENOTSUP) |
#define ENOTSUP 4096 |
#define ENOTSUP 4096 |
#endif |
#endif |
|
#if !defined(ECANCELED) |
|
#define ECANCELED 4097 |
|
#endif |
#ifndef TIME_MAX |
#ifndef TIME_MAX |
#define TIME_MAX LONG_MAX |
#define TIME_MAX LONG_MAX |
#endif |
#endif |
|
|
|
/* HOST_LONG_BITS is the size of a native pointer in bits. */ |
|
#if UINTPTR_MAX == UINT32_MAX |
|
# define HOST_LONG_BITS 32 |
|
#elif UINTPTR_MAX == UINT64_MAX |
|
# define HOST_LONG_BITS 64 |
|
#else |
|
# error Unknown pointer size |
|
#endif |
|
|
#ifndef CONFIG_IOVEC |
#ifndef CONFIG_IOVEC |
#define CONFIG_IOVEC |
#define CONFIG_IOVEC |
struct iovec { |
struct iovec { |
Line 84 typedef int (*fprintf_function)(FILE *f,
|
Line 96 typedef int (*fprintf_function)(FILE *f,
|
|
|
#ifdef _WIN32 |
#ifdef _WIN32 |
#define fsync _commit |
#define fsync _commit |
#define lseek _lseeki64 |
#if !defined(lseek) |
|
# define lseek _lseeki64 |
|
#endif |
int qemu_ftruncate64(int, int64_t); |
int qemu_ftruncate64(int, int64_t); |
#define ftruncate qemu_ftruncate64 |
#if !defined(ftruncate) |
|
# define ftruncate qemu_ftruncate64 |
|
#endif |
|
|
static inline char *realpath(const char *path, char *resolved_path) |
static inline char *realpath(const char *path, char *resolved_path) |
{ |
{ |
Line 173 void *qemu_oom_check(void *ptr);
|
Line 189 void *qemu_oom_check(void *ptr);
|
int qemu_open(const char *name, int flags, ...); |
int qemu_open(const char *name, int flags, ...); |
ssize_t qemu_write_full(int fd, const void *buf, size_t count) |
ssize_t qemu_write_full(int fd, const void *buf, size_t count) |
QEMU_WARN_UNUSED_RESULT; |
QEMU_WARN_UNUSED_RESULT; |
void qemu_set_cloexec(int fd); |
ssize_t qemu_send_full(int fd, const void *buf, size_t count, int flags) |
|
QEMU_WARN_UNUSED_RESULT; |
|
ssize_t qemu_recv_full(int fd, void *buf, size_t count, int flags) |
|
QEMU_WARN_UNUSED_RESULT; |
|
|
#ifndef _WIN32 |
#ifndef _WIN32 |
int qemu_eventfd(int pipefd[2]); |
int qemu_eventfd(int pipefd[2]); |
Line 186 int qemu_pipe(int pipefd[2]);
|
Line 205 int qemu_pipe(int pipefd[2]);
|
#define qemu_recv(sockfd, buf, len, flags) recv(sockfd, buf, len, flags) |
#define qemu_recv(sockfd, buf, len, flags) recv(sockfd, buf, len, flags) |
#endif |
#endif |
|
|
|
int qemu_recvv(int sockfd, struct iovec *iov, int len, int iov_offset); |
|
int qemu_sendv(int sockfd, struct iovec *iov, int len, int iov_offset); |
|
|
/* Error handling. */ |
/* Error handling. */ |
|
|
void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2); |
void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2); |
Line 216 typedef struct MACAddr MACAddr;
|
Line 238 typedef struct MACAddr MACAddr;
|
typedef struct VLANState VLANState; |
typedef struct VLANState VLANState; |
typedef struct VLANClientState VLANClientState; |
typedef struct VLANClientState VLANClientState; |
typedef struct i2c_bus i2c_bus; |
typedef struct i2c_bus i2c_bus; |
typedef struct i2c_slave i2c_slave; |
typedef struct ISABus ISABus; |
typedef struct SMBusDevice SMBusDevice; |
typedef struct SMBusDevice SMBusDevice; |
typedef struct PCIHostState PCIHostState; |
typedef struct PCIHostState PCIHostState; |
typedef struct PCIExpressHost PCIExpressHost; |
typedef struct PCIExpressHost PCIExpressHost; |
Line 239 typedef struct SSIBus SSIBus;
|
Line 261 typedef struct SSIBus SSIBus;
|
typedef struct EventNotifier EventNotifier; |
typedef struct EventNotifier EventNotifier; |
typedef struct VirtIODevice VirtIODevice; |
typedef struct VirtIODevice VirtIODevice; |
typedef struct QEMUSGList QEMUSGList; |
typedef struct QEMUSGList QEMUSGList; |
|
typedef struct SHPCDevice SHPCDevice; |
|
|
typedef uint64_t pcibus_t; |
typedef uint64_t pcibus_t; |
|
|
|
typedef enum LostTickPolicy { |
|
LOST_TICK_DISCARD, |
|
LOST_TICK_DELAY, |
|
LOST_TICK_MERGE, |
|
LOST_TICK_SLEW, |
|
LOST_TICK_MAX |
|
} LostTickPolicy; |
|
|
void tcg_exec_init(unsigned long tb_size); |
void tcg_exec_init(unsigned long tb_size); |
bool tcg_enabled(void); |
bool tcg_enabled(void); |
|
|
Line 271 struct qemu_work_item {
|
Line 302 struct qemu_work_item {
|
void qemu_init_vcpu(void *env); |
void qemu_init_vcpu(void *env); |
#endif |
#endif |
|
|
|
/** |
|
* Sends an iovec (or optionally a part of it) down a socket, yielding |
|
* when the socket is full. |
|
*/ |
|
int qemu_co_sendv(int sockfd, struct iovec *iov, |
|
int len, int iov_offset); |
|
|
|
/** |
|
* Receives data into an iovec (or optionally into a part of it) from |
|
* a socket, yielding when there is no data in the socket. |
|
*/ |
|
int qemu_co_recvv(int sockfd, struct iovec *iov, |
|
int len, int iov_offset); |
|
|
|
|
|
/** |
|
* Sends a buffer down a socket, yielding when the socket is full. |
|
*/ |
|
int qemu_co_send(int sockfd, void *buf, int len); |
|
|
|
/** |
|
* Receives data into a buffer from a socket, yielding when there |
|
* is no data in the socket. |
|
*/ |
|
int qemu_co_recv(int sockfd, void *buf, int len); |
|
|
|
|
typedef struct QEMUIOVector { |
typedef struct QEMUIOVector { |
struct iovec *iov; |
struct iovec *iov; |
int niov; |
int niov; |
Line 292 void qemu_iovec_memset(QEMUIOVector *qio
|
Line 350 void qemu_iovec_memset(QEMUIOVector *qio
|
void qemu_iovec_memset_skip(QEMUIOVector *qiov, int c, size_t count, |
void qemu_iovec_memset_skip(QEMUIOVector *qiov, int c, size_t count, |
size_t skip); |
size_t skip); |
|
|
|
bool buffer_is_zero(const void *buf, size_t len); |
|
|
void qemu_progress_init(int enabled, float min_skip); |
void qemu_progress_init(int enabled, float min_skip); |
void qemu_progress_end(void); |
void qemu_progress_end(void); |
void qemu_progress_print(float delta, int max); |
void qemu_progress_print(float delta, int max); |
Line 341 static inline uint64_t muldiv64(uint64_t
|
Line 401 static inline uint64_t muldiv64(uint64_t
|
return res.ll; |
return res.ll; |
} |
} |
|
|
|
/* Round number down to multiple */ |
|
#define QEMU_ALIGN_DOWN(n, m) ((n) / (m) * (m)) |
|
|
|
/* Round number up to multiple */ |
|
#define QEMU_ALIGN_UP(n, m) QEMU_ALIGN_DOWN((n) + (m) - 1, (m)) |
|
|
#include "module.h" |
#include "module.h" |
|
|
#endif |
#endif |