[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/4] coroutine: Break inclusion loop
From: |
Markus Armbruster |
Subject: |
[PATCH 4/4] coroutine: Break inclusion loop |
Date: |
Thu, 8 Dec 2022 15:23:06 +0100 |
qemu/coroutine.h and qemu/lockable.h include each other. Neither
header actually needs the other one.
Drop #include "qemu/coroutine.h" from qemu/lockable.h to break the
loop. All users of lockable.h actually need qemu/coroutine.h, so
adjust their #include directives.
I'm not dropping the #include "qemu/lockable" from qemu/coroutine.h,
because that would require adding it back next to #include
"qemu/coroutine.h" all over the place. It's in an unusual place,
though. Move it to the usual place, next to the other #include
directives.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
include/qemu/coroutine.h | 3 +--
include/qemu/lockable.h | 1 -
include/qemu/ratelimit.h | 2 +-
include/qemu/seqlock.h | 2 +-
linux-user/fd-trans.h | 2 +-
backends/tpm/tpm_emulator.c | 2 +-
cpus-common.c | 2 +-
hw/hyperv/hyperv.c | 2 +-
hw/usb/ccid-card-emulated.c | 2 +-
hw/vfio/platform.c | 2 +-
plugins/core.c | 2 +-
plugins/loader.c | 2 +-
ui/spice-display.c | 2 +-
util/log.c | 2 +-
util/qemu-timer.c | 2 +-
util/rcu.c | 2 +-
util/vfio-helpers.c | 2 +-
util/yank.c | 2 +-
18 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h
index 2496a4f4ef..2504d4757f 100644
--- a/include/qemu/coroutine.h
+++ b/include/qemu/coroutine.h
@@ -15,6 +15,7 @@
#ifndef QEMU_COROUTINE_H
#define QEMU_COROUTINE_H
+#include "qemu/lockable.h"
#include "qemu/queue.h"
#include "qemu/timer.h"
@@ -376,8 +377,6 @@ void qemu_coroutine_inc_pool_size(unsigned int
additional_pool_size);
*/
void qemu_coroutine_dec_pool_size(unsigned int additional_pool_size);
-#include "qemu/lockable.h"
-
/**
* Sends a (part of) iovec down a socket, yielding when the socket is full, or
* Receives data into a (part of) iovec from a socket,
diff --git a/include/qemu/lockable.h b/include/qemu/lockable.h
index 86db7cb04c..7d6cdeb750 100644
--- a/include/qemu/lockable.h
+++ b/include/qemu/lockable.h
@@ -13,7 +13,6 @@
#ifndef QEMU_LOCKABLE_H
#define QEMU_LOCKABLE_H
-#include "qemu/coroutine.h"
#include "qemu/thread.h"
typedef void QemuLockUnlockFunc(void *);
diff --git a/include/qemu/ratelimit.h b/include/qemu/ratelimit.h
index 48bf59e857..4e07e1e2a4 100644
--- a/include/qemu/ratelimit.h
+++ b/include/qemu/ratelimit.h
@@ -14,7 +14,7 @@
#ifndef QEMU_RATELIMIT_H
#define QEMU_RATELIMIT_H
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
#include "qemu/timer.h"
typedef struct {
diff --git a/include/qemu/seqlock.h b/include/qemu/seqlock.h
index ecb7d2c864..79a0af625b 100644
--- a/include/qemu/seqlock.h
+++ b/include/qemu/seqlock.h
@@ -16,7 +16,7 @@
#include "qemu/atomic.h"
#include "qemu/thread.h"
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
typedef struct QemuSeqLock QemuSeqLock;
diff --git a/linux-user/fd-trans.h b/linux-user/fd-trans.h
index 1b9fa2041c..e662d644bc 100644
--- a/linux-user/fd-trans.h
+++ b/linux-user/fd-trans.h
@@ -16,7 +16,7 @@
#ifndef FD_TRANS_H
#define FD_TRANS_H
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
typedef abi_long (*TargetFdDataFunc)(void *, size_t);
typedef abi_long (*TargetFdAddrFunc)(void *, abi_ulong, socklen_t);
diff --git a/backends/tpm/tpm_emulator.c b/backends/tpm/tpm_emulator.c
index 49cc3d749d..f364b089ad 100644
--- a/backends/tpm/tpm_emulator.c
+++ b/backends/tpm/tpm_emulator.c
@@ -30,7 +30,7 @@
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "qemu/sockets.h"
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
#include "io/channel-socket.h"
#include "sysemu/runstate.h"
#include "sysemu/tpm_backend.h"
diff --git a/cpus-common.c b/cpus-common.c
index 793364dc0e..1b1f8f75c9 100644
--- a/cpus-common.c
+++ b/cpus-common.c
@@ -22,7 +22,7 @@
#include "exec/cpu-common.h"
#include "hw/core/cpu.h"
#include "sysemu/cpus.h"
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
static QemuMutex qemu_cpu_list_lock;
static QemuCond exclusive_cond;
diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c
index 57b402b956..41f3e9f1ca 100644
--- a/hw/hyperv/hyperv.c
+++ b/hw/hyperv/hyperv.c
@@ -15,7 +15,7 @@
#include "sysemu/kvm.h"
#include "qemu/bitops.h"
#include "qemu/error-report.h"
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
#include "qemu/queue.h"
#include "qemu/rcu.h"
#include "qemu/rcu_queue.h"
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index ee41a81801..6962143c29 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -30,7 +30,7 @@
#include <libcacard.h>
#include "qemu/thread.h"
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
#include "qemu/main-loop.h"
#include "qemu/module.h"
#include "ccid.h"
diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index 5af73f9287..e252edc04a 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -22,7 +22,7 @@
#include "hw/vfio/vfio-platform.h"
#include "migration/vmstate.h"
#include "qemu/error-report.h"
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
#include "qemu/main-loop.h"
#include "qemu/module.h"
#include "qemu/range.h"
diff --git a/plugins/core.c b/plugins/core.c
index ccb770a485..313a631ecf 100644
--- a/plugins/core.c
+++ b/plugins/core.c
@@ -15,7 +15,7 @@
#include "qemu/error-report.h"
#include "qemu/config-file.h"
#include "qapi/error.h"
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
#include "qemu/option.h"
#include "qemu/rcu_queue.h"
#include "qemu/xxhash.h"
diff --git a/plugins/loader.c b/plugins/loader.c
index 88c30bde2d..0e0a19730e 100644
--- a/plugins/loader.c
+++ b/plugins/loader.c
@@ -19,7 +19,7 @@
#include "qemu/error-report.h"
#include "qemu/config-file.h"
#include "qapi/error.h"
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
#include "qemu/option.h"
#include "qemu/rcu_queue.h"
#include "qemu/qht.h"
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 494168e7fe..8e2245309e 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -18,7 +18,7 @@
#include "qemu/osdep.h"
#include "ui/qemu-spice.h"
#include "qemu/timer.h"
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
#include "qemu/main-loop.h"
#include "qemu/option.h"
#include "qemu/queue.h"
diff --git a/util/log.c b/util/log.c
index c2198badf2..157c25f0b5 100644
--- a/util/log.c
+++ b/util/log.c
@@ -25,7 +25,7 @@
#include "qemu/cutils.h"
#include "trace/control.h"
#include "qemu/thread.h"
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
#include "qemu/rcu.h"
#ifdef CONFIG_LINUX
#include <sys/syscall.h>
diff --git a/util/qemu-timer.c b/util/qemu-timer.c
index 6a0de33dd2..6d5d21cb92 100644
--- a/util/qemu-timer.c
+++ b/util/qemu-timer.c
@@ -25,7 +25,7 @@
#include "qemu/osdep.h"
#include "qemu/main-loop.h"
#include "qemu/timer.h"
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
#include "sysemu/cpu-timers.h"
#include "sysemu/replay.h"
#include "sysemu/cpus.h"
diff --git a/util/rcu.c b/util/rcu.c
index b6d6c71cff..013700bb5c 100644
--- a/util/rcu.c
+++ b/util/rcu.c
@@ -31,7 +31,7 @@
#include "qemu/atomic.h"
#include "qemu/thread.h"
#include "qemu/main-loop.h"
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
#if defined(CONFIG_MALLOC_TRIM)
#include <malloc.h>
#endif
diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c
index 0d1520caac..8584db8416 100644
--- a/util/vfio-helpers.c
+++ b/util/vfio-helpers.c
@@ -22,7 +22,7 @@
#include "standard-headers/linux/pci_regs.h"
#include "qemu/event_notifier.h"
#include "qemu/vfio-helpers.h"
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
#include "trace.h"
#define QEMU_VFIO_DEBUG 0
diff --git a/util/yank.c b/util/yank.c
index abf47c346d..1fd3e550c1 100644
--- a/util/yank.c
+++ b/util/yank.c
@@ -11,7 +11,7 @@
#include "qapi/error.h"
#include "qemu/thread.h"
#include "qemu/queue.h"
-#include "qemu/lockable.h"
+#include "qemu/coroutine.h"
#include "qapi/qapi-commands-yank.h"
#include "qapi/qapi-visit-yank.h"
#include "qapi/clone-visitor.h"
--
2.37.3
- [PATCH 0/4] coroutine: Clean up includes, Markus Armbruster, 2022/12/08
- [PATCH 3/4] coroutine: Clean up superfluous inclusion of qemu/lockable.h, Markus Armbruster, 2022/12/08
- [PATCH 1/4] coroutine: Clean up superfluous inclusion of qemu/coroutine.h, Markus Armbruster, 2022/12/08
- [PATCH 2/4] coroutine: Move coroutine_fn to qemu/osdep.h, trim includes, Markus Armbruster, 2022/12/08
- [PATCH 4/4] coroutine: Break inclusion loop,
Markus Armbruster <=
- Re: [PATCH 4/4] coroutine: Break inclusion loop, Philippe Mathieu-Daudé, 2022/12/17