#endif
#include "block_int.h"
#include <assert.h>
+#ifdef CONFIG_AIO
#include <aio.h>
+#endif
#ifdef CONFIG_COCOA
#include <paths.h>
#endif
+#ifdef CONFIG_AIO
/***********************************************************/
/* Unix AIO using POSIX AIO */
}
}
+# else /* CONFIG_AIO */
+
+void qemu_aio_init(void)
+{
+}
+
+void qemu_aio_poll(void)
+{
+}
+
+void qemu_aio_flush(void)
+{
+}
+
+void qemu_aio_wait_start(void)
+{
+}
+
+void qemu_aio_wait(void)
+{
+#if !defined(QEMU_IMG) && !defined(QEMU_NBD)
+ qemu_bh_poll();
+#endif
+}
+
+void qemu_aio_wait_end(void)
+{
+}
+
+#endif /* CONFIG_AIO */
+
static void raw_close(BlockDriverState *bs)
{
BDRVRawState *s = bs->opaque;
raw_create,
raw_flush,
+#ifdef CONFIG_AIO
.bdrv_aio_read = raw_aio_read,
.bdrv_aio_write = raw_aio_write,
.bdrv_aio_cancel = raw_aio_cancel,
.aiocb_size = sizeof(RawAIOCB),
+#endif
.protocol_name = "file",
.bdrv_pread = raw_pread,
.bdrv_pwrite = raw_pwrite,
NULL,
raw_flush,
+#ifdef CONFIG_AIO
.bdrv_aio_read = raw_aio_read,
.bdrv_aio_write = raw_aio_write,
.bdrv_aio_cancel = raw_aio_cancel,
.aiocb_size = sizeof(RawAIOCB),
+#endif
.bdrv_pread = raw_pread,
.bdrv_pwrite = raw_pwrite,
.bdrv_getlength = raw_getlength,
build_docs="no"
uname_release=""
curses="yes"
+aio="yes"
nptl="yes"
mixemu="no"
;;
--enable-mixemu) mixemu="yes"
;;
+ --disable-aio) aio="no"
+ ;;
*) echo "ERROR: unknown option $opt"; show_help="yes"
;;
esac
echo " --enable-uname-release=R Return R for uname -r in usermode emulation"
echo " --sparc_cpu=V Build qemu for Sparc architecture v7, v8, v8plus, v8plusa, v9"
echo " --disable-vde disable support for vde network"
+echo " --disable-aio disable AIO support"
echo ""
echo "NOTE: The object files are built at the place where configure is launched"
exit 1
fi
fi # test "$curses"
+##########################################
+# AIO probe
+if test "$aio" = "yes" ; then
+ aio=no
+ cat > $TMPC << EOF
+#include <aio.h>
+int main(void) { return aio_write(NULL); }
+EOF
+ if $cc $ARCH_CFLAGS -o $TMPE $AIOLIBS $TMPC 2> /dev/null ; then
+ aio=yes
+ fi
+fi
+
# Check if tools are available to build documentation.
if [ -x "`which texi2html 2>/dev/null`" ] && \
[ -x "`which pod2man 2>/dev/null`" ]; then
echo "uname -r $uname_release"
echo "NPTL support $nptl"
echo "vde support $vde"
+echo "AIO support $aio"
if test $sdl_too_old = "yes"; then
echo "-> Your SDL version is too old - please upgrade to have SDL support"
echo "#define CONFIG_BRLAPI 1" >> $config_h
echo "BRLAPI_LIBS=-lbrlapi" >> $config_mak
fi
+if test "$aio" = "yes" ; then
+ echo "#define CONFIG_AIO 1" >> $config_h
+fi
# XXX: suppress that
if [ "$bsd" = "yes" ] ; then