xemu/migration
Paolo Bonzini 0b8b8753e4 coroutine: move entry argument to qemu_coroutine_create
In practice the entry argument is always known at creation time, and
it is confusing that sometimes qemu_coroutine_enter is used with a
non-NULL argument to re-enter a coroutine (this happens in
block/sheepdog.c and tests/test-coroutine.c).  So pass the opaque value
at creation time, for consistency with e.g. aio_bh_new.

Mostly done with the following semantic patch:

@ entry1 @
expression entry, arg, co;
@@
- co = qemu_coroutine_create(entry);
+ co = qemu_coroutine_create(entry, arg);
  ...
- qemu_coroutine_enter(co, arg);
+ qemu_coroutine_enter(co);

@ entry2 @
expression entry, arg;
identifier co;
@@
- Coroutine *co = qemu_coroutine_create(entry);
+ Coroutine *co = qemu_coroutine_create(entry, arg);
  ...
- qemu_coroutine_enter(co, arg);
+ qemu_coroutine_enter(co);

@ entry3 @
expression entry, arg;
@@
- qemu_coroutine_enter(qemu_coroutine_create(entry), arg);
+ qemu_coroutine_enter(qemu_coroutine_create(entry, arg));

@ reentry @
expression co;
@@
- qemu_coroutine_enter(co, NULL);
+ qemu_coroutine_enter(co);

except for the aforementioned few places where the semantic patch
stumbled (as expected) and for test_co_queue, which would otherwise
produce an uninitialized variable warning.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-07-13 13:26:02 +02:00
..
block.c migration/block: Convert saving to BlockBackend 2016-06-08 10:21:08 +02:00
exec.c migration: rename functions to starting migrations 2016-06-16 09:51:37 +05:30
fd.c migration: rename functions to starting migrations 2016-06-16 09:51:37 +05:30
Makefile.objs migration: add support for encrypting data with TLS 2016-05-26 11:32:13 +05:30
migration.c coroutine: move entry argument to qemu_coroutine_create 2016-07-13 13:26:02 +02:00
postcopy-ram.c os-posix: include sys/mman.h 2016-06-16 18:39:03 +02:00
qemu-file-channel.c migration: introduce a new QEMUFile impl based on QIOChannel 2016-05-26 11:31:24 +05:30
qemu-file.c qemu-file: Fix qemu_put_compression_data flaw 2016-06-17 18:24:18 +05:30
qjson.c migration/qjson: Drop gratuitous use of QOM 2016-05-23 14:16:12 +05:30
ram.c migration: code clean up 2016-06-17 18:24:31 +05:30
rdma.c migration: rename functions to starting migrations 2016-06-16 09:51:37 +05:30
savevm.c migration: fix inability to save VM after snapshot 2016-06-17 18:23:57 +05:30
socket.c migration: rename functions to starting migrations 2016-06-16 09:51:37 +05:30
tls.c migration: rename functions to starting migrations 2016-06-16 09:51:37 +05:30
trace-events trace: split out trace events for migration/ directory 2016-06-20 17:22:14 +01:00
vmstate.c migration: Trace improvements 2016-06-17 18:23:53 +05:30
xbzrle.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00