1 /* Common header file that is included by all of qemu. */
5 /* we put basic includes here to avoid repeating them in device drivers */
27 #define ENOMEDIUM ENODEV
31 #define WIN32_LEAN_AND_MEAN
34 #define lseek _lseeki64
36 extern int qemu_ftruncate64(int, int64_t);
37 #define ftruncate qemu_ftruncate64
40 static inline char *realpath(const char *path
, char *resolved_path
)
42 _fullpath(resolved_path
, path
, _MAX_PATH
);
52 /* FIXME: Remove NEED_CPU_H. */
55 #include "config-host.h"
64 #endif /* !defined(NEED_CPU_H) */
67 typedef struct QEMUBH QEMUBH
;
69 typedef void QEMUBHFunc(void *opaque
);
71 QEMUBH
*qemu_bh_new(QEMUBHFunc
*cb
, void *opaque
);
72 void qemu_bh_schedule(QEMUBH
*bh
);
73 void qemu_bh_cancel(QEMUBH
*bh
);
74 void qemu_bh_delete(QEMUBH
*bh
);
75 int qemu_bh_poll(void);
77 uint64_t muldiv64(uint64_t a
, uint32_t b
, uint32_t c
);
80 void pstrcpy(char *buf
, int buf_size
, const char *str
);
81 char *pstrcat(char *buf
, int buf_size
, const char *s
);
82 int strstart(const char *str
, const char *val
, const char **ptr
);
83 int stristart(const char *str
, const char *val
, const char **ptr
);
84 time_t mktimegm(struct tm
*tm
);
86 char *urldecode(const char *ptr
);
90 void hw_error(const char *fmt
, ...)
91 __attribute__ ((__format__ (__printf__
, 1, 2)))
92 __attribute__ ((__noreturn__
));
95 typedef void IOReadHandler(void *opaque
, const uint8_t *buf
, int size
);
96 typedef int IOCanRWHandler(void *opaque
);
97 typedef void IOHandler(void *opaque
);
99 struct ParallelIOArg
{
104 typedef int (*DMA_transfer_handler
) (void *opaque
, int nchan
, int pos
, int size
);
106 /* A load of opaque types so that device init declarations don't have to
107 pull in all the real definitions. */
108 typedef struct NICInfo NICInfo
;
109 typedef struct AudioState AudioState
;
110 typedef struct BlockDriverState BlockDriverState
;
111 typedef struct DisplayState DisplayState
;
112 typedef struct TextConsole TextConsole
;
113 typedef struct CharDriverState CharDriverState
;
114 typedef struct VLANState VLANState
;
115 typedef struct QEMUFile QEMUFile
;
116 typedef struct i2c_bus i2c_bus
;
117 typedef struct i2c_slave i2c_slave
;
118 typedef struct SMBusDevice SMBusDevice
;
119 typedef struct QEMUTimer QEMUTimer
;
120 typedef struct PCIBus PCIBus
;
121 typedef struct PCIDevice PCIDevice
;
122 typedef struct SerialState SerialState
;
123 typedef struct IRQState
*qemu_irq
;
124 struct pcmcia_card_s
;