mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
This adds fixes to the stub domain build into compiling Ian Jackson's qemu-xen. The most notable change is that mini-os headers now #include each other through a mini-os/ prefix, so that we can turn all -I into -isystem and still be sure that we include Mini-OS headers (and not qemu's console.h or blktaplib's list.h for instance...). Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
43 lines
1.2 KiB
C
43 lines
1.2 KiB
C
#include <mini-os/wait.h>
|
|
#include <xen/io/blkif.h>
|
|
#include <mini-os/types.h>
|
|
struct blkfront_dev;
|
|
struct blkfront_aiocb
|
|
{
|
|
struct blkfront_dev *aio_dev;
|
|
uint8_t *aio_buf;
|
|
size_t aio_nbytes;
|
|
off_t aio_offset;
|
|
void *data;
|
|
|
|
grant_ref_t gref[BLKIF_MAX_SEGMENTS_PER_REQUEST];
|
|
int n;
|
|
|
|
void (*aio_cb)(struct blkfront_aiocb *aiocb, int ret);
|
|
};
|
|
struct blkfront_info
|
|
{
|
|
uint64_t sectors;
|
|
unsigned sector_size;
|
|
int mode;
|
|
int info;
|
|
int barrier;
|
|
int flush;
|
|
};
|
|
struct blkfront_dev *init_blkfront(char *nodename, struct blkfront_info *info);
|
|
#ifdef HAVE_LIBC
|
|
int blkfront_open(struct blkfront_dev *dev);
|
|
#endif
|
|
void blkfront_aio(struct blkfront_aiocb *aiocbp, int write);
|
|
#define blkfront_aio_read(aiocbp) blkfront_aio(aiocbp, 0)
|
|
#define blkfront_aio_write(aiocbp) blkfront_aio(aiocbp, 1)
|
|
void blkfront_io(struct blkfront_aiocb *aiocbp, int write);
|
|
#define blkfront_read(aiocbp) blkfront_io(aiocbp, 0)
|
|
#define blkfront_write(aiocbp) blkfront_io(aiocbp, 1)
|
|
void blkfront_aio_push_operation(struct blkfront_aiocb *aiocbp, uint8_t op);
|
|
int blkfront_aio_poll(struct blkfront_dev *dev);
|
|
void blkfront_sync(struct blkfront_dev *dev);
|
|
void shutdown_blkfront(struct blkfront_dev *dev);
|
|
|
|
extern struct wait_queue_head blkfront_queue;
|