qemu-irix/tests
Stefan Hajnoczi 98563fc3ec aio: add aio_context_acquire() and aio_context_release()
It can be useful to run an AioContext from a thread which normally does
not "own" the AioContext.  For example, request draining can be
implemented by acquiring the AioContext and looping aio_poll() until all
requests have been completed.

The following pattern should work:

  /* Event loop thread */
  while (running) {
      aio_context_acquire(ctx);
      aio_poll(ctx, true);
      aio_context_release(ctx);
  }

  /* Another thread */
  aio_context_acquire(ctx);
  bdrv_read(bs, 0x1000, buf, 1);
  aio_context_release(ctx);

This patch implements aio_context_acquire() and aio_context_release().

Note that existing aio_poll() callers do not need to worry about
acquiring and releasing - it is only needed when multiple threads will
call aio_poll() on the same AioContext.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13 14:42:24 +01:00
..
acpi-test-data acpi-test: update expected SSDT files 2014-03-11 13:27:27 +02:00
libqos
multiboot
qapi-schema qapi script: do not allow string discriminator 2014-03-11 09:07:42 -04:00
qemu-iotests iotests: Test corruption during COW request 2014-03-13 14:23:27 +01:00
tcg target-xtensa: add basic tests for cache opcodes 2014-02-24 04:47:02 +04:00
.gitignore
Makefile rfifolock: add recursive FIFO lock 2014-03-13 14:42:21 +01:00
acpi-test.c acpi-test: issue errors instead of warnings when possible 2014-03-09 21:09:38 +02:00
blockdev-test.c
boot-order-test.c
check-block.sh
check-qdict.c check-qdict: Test termination of qdict_array_split() 2014-02-21 22:18:26 +01:00
check-qfloat.c
check-qint.c
check-qjson.c
check-qlist.c
check-qom-interface.c
check-qstring.c
e1000-test.c
eepro100-test.c
endianness-test.c
fdc-test.c
fw_cfg-test.c
hd-geo-test.c
i440fx-test.c
ide-test.c
ipoctal232-test.c
libqtest.c
libqtest.h
m48t59-test.c
ne2000-test.c
pcnet-test.c
qdev-monitor-test.c
qemu-iotests-quick.sh qemu-iotests: add more tests to the "quick" group 2014-02-28 18:59:06 +01:00
qom-test.c
rtc-test.c
rtl8139-test.c
test-aio.c aio: add aio_context_acquire() and aio_context_release() 2014-03-13 14:42:24 +01:00
test-bitops.c
test-coroutine.c
test-cutils.c
test-hbitmap.c
test-int128.c tests/test-int128: Don't use __noclone__ attribute on clang 2014-03-02 17:20:37 +04:00
test-iov.c
test-mul64.c
test-opts-visitor.c
test-qdev-global-props.c
test-qmp-commands.c tests: test-qmp-commands: Fix double free 2014-03-11 09:07:42 -04:00
test-qmp-input-strict.c qapi script: do not allow string discriminator 2014-03-11 09:07:42 -04:00
test-qmp-input-visitor.c qapi script: do not allow string discriminator 2014-03-11 09:07:42 -04:00
test-qmp-output-visitor.c qapi script: do not allow string discriminator 2014-03-11 09:07:42 -04:00
test-rfifolock.c rfifolock: add recursive FIFO lock 2014-03-13 14:42:21 +01:00
test-string-input-visitor.c
test-string-output-visitor.c
test-thread-pool.c
test-throttle.c
test-visitor-serialization.c tests/qapi-schema: Cover complex types with base 2014-03-03 11:16:45 -05:00
test-vmstate.c
test-x86-cpuid.c
test-xbzrle.c
tmp105-test.c
tpci200-test.c
virtio-net-test.c
vmxnet3-test.c