Revision 414f0dab block-raw-posix.c

b/block-raw-posix.c
28 28
#endif
29 29
#include "block_int.h"
30 30
#include <assert.h>
31
#ifdef CONFIG_AIO
31 32
#include <aio.h>
33
#endif
32 34

  
33 35
#ifdef CONFIG_COCOA
34 36
#include <paths.h>
......
418 420
#endif
419 421

  
420 422

  
423
#ifdef CONFIG_AIO
421 424
/***********************************************************/
422 425
/* Unix AIO using POSIX AIO */
423 426

  
......
688 691
    }
689 692
}
690 693

  
694
# else /* CONFIG_AIO */
695

  
696
void qemu_aio_init(void)
697
{
698
}
699

  
700
void qemu_aio_poll(void)
701
{
702
}
703

  
704
void qemu_aio_flush(void)
705
{
706
}
707

  
708
void qemu_aio_wait_start(void)
709
{
710
}
711

  
712
void qemu_aio_wait(void)
713
{
714
#if !defined(QEMU_IMG) && !defined(QEMU_NBD)
715
    qemu_bh_poll();
716
#endif
717
}
718

  
719
void qemu_aio_wait_end(void)
720
{
721
}
722

  
723
#endif /* CONFIG_AIO */
724

  
691 725
static void raw_close(BlockDriverState *bs)
692 726
{
693 727
    BDRVRawState *s = bs->opaque;
......
792 826
    raw_create,
793 827
    raw_flush,
794 828

  
829
#ifdef CONFIG_AIO
795 830
    .bdrv_aio_read = raw_aio_read,
796 831
    .bdrv_aio_write = raw_aio_write,
797 832
    .bdrv_aio_cancel = raw_aio_cancel,
798 833
    .aiocb_size = sizeof(RawAIOCB),
834
#endif
799 835
    .protocol_name = "file",
800 836
    .bdrv_pread = raw_pread,
801 837
    .bdrv_pwrite = raw_pwrite,
......
1144 1180
    NULL,
1145 1181
    raw_flush,
1146 1182

  
1183
#ifdef CONFIG_AIO
1147 1184
    .bdrv_aio_read = raw_aio_read,
1148 1185
    .bdrv_aio_write = raw_aio_write,
1149 1186
    .bdrv_aio_cancel = raw_aio_cancel,
1150 1187
    .aiocb_size = sizeof(RawAIOCB),
1188
#endif
1151 1189
    .bdrv_pread = raw_pread,
1152 1190
    .bdrv_pwrite = raw_pwrite,
1153 1191
    .bdrv_getlength = raw_getlength,

Also available in: Unified diff