qemu-e2k/hw/9pfs
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
..
9p-handle.c 9p: switch back to readdir() 2016-06-06 11:52:34 +02:00
9p-local.c 9p: switch back to readdir() 2016-06-06 11:52:34 +02:00
9p-posix-acl.c 9pfs: Clean up includes 2016-01-29 15:07:23 +00:00
9p-proxy.c 9p: switch back to readdir() 2016-06-06 11:52:34 +02:00
9p-proxy.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
9p-synth.c 9p: synth: drop v9fs_ prefix 2016-07-01 14:38:54 +02:00
9p-synth.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
9p-xattr-user.c 9pfs: Clean up includes 2016-01-29 15:07:23 +00:00
9p-xattr.c 9pfs: Clean up includes 2016-01-29 15:07:23 +00:00
9p-xattr.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
9p.c coroutine: move entry argument to qemu_coroutine_create 2016-07-13 13:26:02 +02:00
9p.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
Makefile.objs 9pfs: rename virtio-9p.c to 9p.c 2016-01-08 15:32:13 +05:30
codir.c 9p: switch back to readdir() 2016-06-06 11:52:34 +02:00
cofile.c 9p/fsdev: remove obsolete references to virtio 2016-06-06 11:52:34 +02:00
cofs.c 9p/fsdev: remove obsolete references to virtio 2016-06-06 11:52:34 +02:00
coth.c coroutine: move entry argument to qemu_coroutine_create 2016-07-13 13:26:02 +02:00
coth.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
coxattr.c 9p/fsdev: remove obsolete references to virtio 2016-06-06 11:52:34 +02:00
trace-events trace: split out trace events for hw/9pfs/ directory 2016-06-20 17:22:16 +01:00
virtio-9p-device.c 9p: drop useless inclusion of hw/i386/pc.h 2016-06-06 11:52:34 +02:00
virtio-9p.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00