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
33 #define lseek _lseeki64
35 extern int qemu_ftruncate64(int, int64_t);
36 #define ftruncate qemu_ftruncate64
39 static inline char *realpath(const char *path
, char *resolved_path
)
41 _fullpath(resolved_path
, path
, _MAX_PATH
);
51 /* FIXME: Remove NEED_CPU_H. */
54 #include "config-host.h"
63 #endif /* !defined(NEED_CPU_H) */
66 typedef struct QEMUBH QEMUBH
;
68 typedef void QEMUBHFunc(void *opaque
);
70 QEMUBH
*qemu_bh_new(QEMUBHFunc
*cb
, void *opaque
);
71 void qemu_bh_schedule(QEMUBH
*bh
);
72 void qemu_bh_cancel(QEMUBH
*bh
);
73 void qemu_bh_delete(QEMUBH
*bh
);
74 int qemu_bh_poll(void);
76 uint64_t muldiv64(uint64_t a
, uint32_t b
, uint32_t c
);
79 void pstrcpy(char *buf
, int buf_size
, const char *str
);
80 char *pstrcat(char *buf
, int buf_size
, const char *s
);
81 int strstart(const char *str
, const char *val
, const char **ptr
);
82 int stristart(const char *str
, const char *val
, const char **ptr
);
83 time_t mktimegm(struct tm
*tm
);
87 void hw_error(const char *fmt
, ...)
88 __attribute__ ((__format__ (__printf__
, 1, 2)))
89 __attribute__ ((__noreturn__
));
92 typedef void IOReadHandler(void *opaque
, const uint8_t *buf
, int size
);
93 typedef int IOCanRWHandler(void *opaque
);
94 typedef void IOHandler(void *opaque
);
96 struct ParallelIOArg
{
101 typedef int (*DMA_transfer_handler
) (void *opaque
, int nchan
, int pos
, int size
);
103 /* A load of opaque types so that device init declarations don't have to
104 pull in all the real definitions. */
105 typedef struct NICInfo NICInfo
;
106 typedef struct AudioState AudioState
;
107 typedef struct BlockDriverState BlockDriverState
;
108 typedef struct DisplayState DisplayState
;
109 typedef struct TextConsole TextConsole
;
110 typedef struct CharDriverState CharDriverState
;
111 typedef struct VLANState VLANState
;
112 typedef struct QEMUFile QEMUFile
;
113 typedef struct i2c_bus i2c_bus
;
114 typedef struct i2c_slave i2c_slave
;
115 typedef struct SMBusDevice SMBusDevice
;
116 typedef struct QEMUTimer QEMUTimer
;
117 typedef struct PCIBus PCIBus
;
118 typedef struct PCIDevice PCIDevice
;
119 typedef struct SerialState SerialState
;
120 typedef struct IRQState
*qemu_irq
;
121 struct pcmcia_card_s
;