From 23792478103f444e34621de0ac3b19ef648ae752 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 21 Dec 2022 14:14:31 +0100 Subject: coroutine: Clean up superfluous inclusion of qemu/coroutine.h Signed-off-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi Message-Id: <20221221131435.3851212-2-armbru@redhat.com> --- tests/unit/test-coroutine.c | 1 - tests/unit/test-vmstate.c | 1 - 2 files changed, 2 deletions(-) (limited to 'tests/unit') diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c index e16b80c245..513800d3db 100644 --- a/tests/unit/test-coroutine.c +++ b/tests/unit/test-coroutine.c @@ -12,7 +12,6 @@ */ #include "qemu/osdep.h" -#include "qemu/coroutine.h" #include "qemu/coroutine_int.h" #include "qemu/lockable.h" diff --git a/tests/unit/test-vmstate.c b/tests/unit/test-vmstate.c index 541bb4f63e..79357b29ca 100644 --- a/tests/unit/test-vmstate.c +++ b/tests/unit/test-vmstate.c @@ -29,7 +29,6 @@ #include "migration/qemu-file-types.h" #include "../migration/qemu-file.h" #include "../migration/savevm.h" -#include "qemu/coroutine.h" #include "qemu/module.h" #include "io/channel-file.h" -- cgit v1.2.3 From df4bbc9dcb09d9e3a385ca1a2a23daad0819f531 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 21 Dec 2022 14:14:33 +0100 Subject: coroutine: Clean up superfluous inclusion of qemu/lockable.h Signed-off-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi Message-Id: <20221221131435.3851212-4-armbru@redhat.com> --- tests/unit/test-coroutine.c | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/unit') diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c index 513800d3db..b0d21d673a 100644 --- a/tests/unit/test-coroutine.c +++ b/tests/unit/test-coroutine.c @@ -13,7 +13,6 @@ #include "qemu/osdep.h" #include "qemu/coroutine_int.h" -#include "qemu/lockable.h" /* * Check that qemu_in_coroutine() works -- cgit v1.2.3 From 68ba85cecc7a46ceb66c2f4b5e2165546821d062 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 21 Dec 2022 14:14:34 +0100 Subject: coroutine: Split qemu/coroutine-core.h off qemu/coroutine.h qemu/coroutine.h and qemu/lockable.h include each other. They need each other only in macro expansions, so we could simply drop both inclusions to break the loop, and add suitable includes to files that expand the macros. Instead, move a part of qemu/coroutine.h to new qemu/coroutine-core.h so that qemu/coroutine-core.h doesn't need qemu/lockable.h, and qemu/lockable.h only needs qemu/coroutine-core.h. Result: qemu/coroutine.h includes qemu/lockable.h includes qemu/coroutine-core.h. Signed-off-by: Markus Armbruster Message-Id: <20221221131435.3851212-5-armbru@redhat.com> [Semantic rebase conflict with 7c10cb38cc "accel/tcg: Add debuginfo support" resolved] --- tests/unit/test-aio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/unit') diff --git a/tests/unit/test-aio.c b/tests/unit/test-aio.c index 178048d2f2..321d7ab01a 100644 --- a/tests/unit/test-aio.c +++ b/tests/unit/test-aio.c @@ -16,7 +16,7 @@ #include "qemu/timer.h" #include "qemu/sockets.h" #include "qemu/error-report.h" -#include "qemu/coroutine.h" +#include "qemu/coroutine-core.h" #include "qemu/main-loop.h" static AioContext *ctx; -- cgit v1.2.3 From e2c1c34f139f49ef909bb4322607fb8b39002312 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 21 Dec 2022 14:35:49 +0100 Subject: include/block: Untangle inclusion loops We have two inclusion loops: block/block.h -> block/block-global-state.h -> block/block-common.h -> block/blockjob.h -> block/block.h block/block.h -> block/block-io.h -> block/block-common.h -> block/blockjob.h -> block/block.h I believe these go back to Emanuele's reorganization of the block API, merged a few months ago in commit d7e2fe4aac8. Fortunately, breaking them is merely a matter of deleting unnecessary includes from headers, and adding them back in places where they are now missing. Signed-off-by: Markus Armbruster Message-Id: <20221221133551.3967339-2-armbru@redhat.com> --- tests/unit/test-bdrv-drain.c | 2 +- tests/unit/test-block-iothread.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/unit') diff --git a/tests/unit/test-bdrv-drain.c b/tests/unit/test-bdrv-drain.c index 8cedea4959..4fed8b751f 100644 --- a/tests/unit/test-bdrv-drain.c +++ b/tests/unit/test-bdrv-drain.c @@ -23,7 +23,7 @@ */ #include "qemu/osdep.h" -#include "block/block.h" +#include "block/block_int.h" #include "block/blockjob_int.h" #include "sysemu/block-backend.h" #include "qapi/error.h" diff --git a/tests/unit/test-block-iothread.c b/tests/unit/test-block-iothread.c index 8ca5adec5e..ff5147f619 100644 --- a/tests/unit/test-block-iothread.c +++ b/tests/unit/test-block-iothread.c @@ -24,6 +24,7 @@ #include "qemu/osdep.h" #include "block/block.h" +#include "block/block_int-global-state.h" #include "block/blockjob_int.h" #include "sysemu/block-backend.h" #include "qapi/error.h" -- cgit v1.2.3