[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 9/9] linux-user: Drop unneeded includes from qemu.h
From: |
Peter Maydell |
Subject: |
[PATCH v2 9/9] linux-user: Drop unneeded includes from qemu.h |
Date: |
Wed, 8 Sep 2021 16:44:05 +0100 |
Trim down the #includes in qemu.h where we can, either by
dropping unneeded headers or by moving them to user-internals.h.
This includes deleting a couple of #includes that appear at
weird points midway through the header file.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
linux-user/qemu.h | 4 ----
linux-user/user-internals.h | 2 ++
thunk.c | 1 +
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index fda90fc28d6..5c713fa8ab2 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -2,7 +2,6 @@
#define QEMU_H
#include "cpu.h"
-#include "exec/exec-all.h"
#include "exec/cpu_ldst.h"
#undef DEBUG_REMAP
@@ -163,8 +162,6 @@ typedef struct TaskState {
struct target_sigaltstack sigaltstack_used;
} __attribute__((aligned(16))) TaskState;
-#include "qemu/log.h"
-
abi_long do_brk(abi_ulong new_brk);
/* user access */
@@ -349,5 +346,4 @@ void *lock_user_string(abi_ulong guest_addr);
#define unlock_user_struct(host_ptr, guest_addr, copy) \
unlock_user(host_ptr, guest_addr, (copy) ? sizeof(*host_ptr) : 0)
-#include <pthread.h>
#endif /* QEMU_H */
diff --git a/linux-user/user-internals.h b/linux-user/user-internals.h
index 1729a8b62e1..661612a088b 100644
--- a/linux-user/user-internals.h
+++ b/linux-user/user-internals.h
@@ -20,6 +20,8 @@
#include "hostdep.h"
#include "exec/user/thunk.h"
+#include "exec/exec-all.h"
+#include "qemu/log.h"
extern char *exec_path;
void init_task_state(TaskState *ts);
diff --git a/thunk.c b/thunk.c
index fc5be1a502e..dac4bf11c65 100644
--- a/thunk.c
+++ b/thunk.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
+#include "qemu/log.h"
#include "qemu.h"
#include "exec/user/thunk.h"
--
2.20.1
- [PATCH v2 2/9] linux-user: Split strace prototypes into strace.h, (continued)
- [PATCH v2 2/9] linux-user: Split strace prototypes into strace.h, Peter Maydell, 2021/09/08
- [PATCH v2 4/9] linux-user: Split loader-related prototypes into loader.h, Peter Maydell, 2021/09/08
- [PATCH v2 6/9] linux-user: Split safe-syscall macro into its own header, Peter Maydell, 2021/09/08
- [PATCH v2 8/9] linux-user: Don't include gdbstub.h in qemu.h, Peter Maydell, 2021/09/08
- [PATCH v2 9/9] linux-user: Drop unneeded includes from qemu.h,
Peter Maydell <=
- [PATCH v2 7/9] linux-user: Split linux-user internals out of qemu.h, Peter Maydell, 2021/09/08
- [PATCH v2 3/9] linux-user: Split signal-related prototypes into signal-common.h, Peter Maydell, 2021/09/08
- Re: [PATCH v2 0/9] linux-user: split internals out of qemu.h, Laurent Vivier, 2021/09/13