qemu-e2k/include/qemu
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
..
acl.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
atomic.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
base64.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
bcd.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
bitmap.h
bitops.h bitops: Add MAKE_64BIT_MASK macro 2016-07-04 13:15:22 +01:00
bswap.h bswap.h: Document cpu_to_* and *_to_cpu conversion functions 2016-07-12 15:08:53 +01:00
buffer.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
compatfd.h
compiler.h
config-file.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
coroutine_int.h coroutine: use QSIMPLEQ instead of QTAILQ 2016-07-13 13:26:02 +02:00
coroutine.h coroutine: move entry argument to qemu_coroutine_create 2016-07-13 13:26:02 +02:00
crc32c.h
cutils.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
envlist.h
error-report.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
event_notifier.h
fifo8.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
fifo32.h
fprintf-fn.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
hbitmap.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
help_option.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
host-utils.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
id.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
int128.h
iov.h
log.h log: Fix qemu_set_log_filename() error handling 2016-06-20 16:39:08 +02:00
main-loop.h coroutine: move entry argument to qemu_coroutine_create 2016-07-13 13:26:02 +02:00
memfd.h
mmap-alloc.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
module.h
notify.h
option_int.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
option.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
osdep.h osdep: Introduce qemu_dup 2016-07-13 13:26:02 +02:00
path.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
processor.h include/processor.h: define cpu_relax() 2016-06-11 23:10:17 +00:00
qdist.h clean-includes: run it once more 2016-06-16 18:39:03 +02:00
qht.h clean-includes: run it once more 2016-06-16 18:39:03 +02:00
queue.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
range.h range: Replace internal representation of Range 2016-07-04 16:49:33 +03:00
ratelimit.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
rcu_queue.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
rcu.h
readline.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
rfifolock.h
seqlock.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
sockets.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
thread-posix.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
thread-win32.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
thread.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
throttle.h
timed-average.h
timer.h
typedefs.h
unicode.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
uri.h
xattr.h