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
..
2016-07-04 19:43:33 +03:00
2016-06-08 15:19:30 +08:00
2015-12-17 13:37:15 +00:00
2016-02-08 17:29:54 +01:00
2016-07-12 16:20:46 +02:00
2016-03-18 10:29:26 +01:00
2016-07-04 10:46:59 +01:00
2015-07-07 13:13:22 +01:00
2016-07-12 16:19:16 +02:00
2016-07-06 10:52:04 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-07-04 16:49:34 +03:00
2016-06-07 18:19:24 +03:00
2016-02-23 12:43:05 +00:00
2016-07-12 16:20:46 +02:00
2016-01-07 21:30:16 +01:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-07-06 10:52:03 +02:00
2016-06-07 18:19:24 +03:00
2016-07-06 10:52:04 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-02-16 14:29:27 +00:00
2015-09-15 15:05:09 +01:00
2016-06-07 18:19:24 +03:00
2016-06-20 16:38:13 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-16 18:39:03 +02:00
2016-06-07 18:19:24 +03:00
2016-06-20 16:38:13 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-20 16:38:13 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-20 16:38:13 +02:00
2016-03-22 22:20:15 +01:00
2015-12-18 12:18:31 +00:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-16 18:39:03 +02:00
2016-06-16 09:50:07 +05:30
2016-02-23 12:43:05 +00:00
2016-06-07 18:19:24 +03:00
2016-07-06 10:52:04 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-02-16 14:29:27 +00:00
2016-07-12 16:19:16 +02:00
2016-06-17 15:57:59 +10:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-16 18:39:03 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-17 15:23:51 +01:00
2016-07-13 13:26:02 +02:00
2016-07-06 10:52:04 +02:00
2016-07-13 13:26:02 +02:00
2016-03-22 22:20:15 +01:00
2016-03-22 22:20:15 +01:00
2016-06-07 18:19:24 +03:00
2016-07-04 15:52:36 +01:00
2016-03-22 22:20:15 +01:00
2016-03-22 22:20:15 +01:00
2016-06-13 12:41:17 +01:00
2016-03-22 22:20:15 +01:00
2016-03-22 22:20:15 +01:00
2016-07-04 10:46:59 +01:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-20 16:38:13 +02:00
2016-06-07 18:19:25 +03:00
2016-06-07 18:19:24 +03:00
2016-02-16 14:29:27 +00:00
2016-03-22 22:20:15 +01:00
2016-03-22 22:20:15 +01:00
2016-06-29 16:49:41 +02:00
2016-02-16 14:29:27 +00:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-07-04 16:49:33 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-07-06 10:52:04 +02:00
2016-06-07 18:19:24 +03:00
2016-06-16 18:39:03 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 11:25:06 -05:00
2016-06-16 18:39:03 +02:00
2016-06-16 18:39:03 +02:00
2016-07-06 10:52:04 +02:00
2016-06-07 18:19:24 +03:00
2016-07-06 10:52:04 +02:00
2016-07-06 10:52:04 +02:00
2016-07-06 10:52:04 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-07-06 10:52:04 +02:00
2016-07-06 10:52:04 +02:00
2016-07-13 13:26:02 +02:00
2016-06-07 16:34:45 +01:00
2016-06-07 18:19:24 +03:00
2016-07-06 10:52:04 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-03-22 22:20:17 +01:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-07-12 16:19:16 +02:00
2016-07-12 16:19:16 +02:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-20 16:19:18 +01:00
2016-06-20 16:38:13 +02:00
2016-06-20 16:19:18 +01:00
2016-06-07 18:19:24 +03:00
2016-06-20 16:19:18 +01:00
2016-06-07 18:19:24 +03:00
2016-06-07 18:19:24 +03:00
2016-06-20 16:38:13 +02:00