Patchwork [5/8] linux-user: Move includes of target-specific headers to end of qemu.h

login
register
mail settings
Submitter Peter Maydell
Date July 12, 2013, 8:12 p.m.
Message ID <1373659973-23289-6-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/258791/
State New
Headers show

Comments

Peter Maydell - July 12, 2013, 8:12 p.m.
The target-specific headers (target_cpu.h and target_signal.h)
might need to use the target-independent structure and function
definitions of qemu.h; so include them only at the bottom of
qemu.h, not the top.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 linux-user/qemu.h |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Richard Henderson - July 13, 2013, 9:01 p.m.
On 07/12/2013 01:12 PM, Peter Maydell wrote:
> The target-specific headers (target_cpu.h and target_signal.h)
> might need to use the target-independent structure and function
> definitions of qemu.h; so include them only at the bottom of
> qemu.h, not the top.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

Patch

diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 6569608..8c420da 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -16,8 +16,6 @@ 
 #include "exec/user/thunk.h"
 #include "syscall_defs.h"
 #include "syscall.h"
-#include "target_cpu.h"
-#include "target_signal.h"
 #include "exec/gdbstub.h"
 #include "qemu/queue.h"
 
@@ -454,4 +452,11 @@  static inline void *lock_user_string(abi_ulong guest_addr)
 #include <pthread.h>
 #endif
 
+/* Include target-specific struct and function definitions;
+ * they may need access to the target-independent structures
+ * above, so include them last.
+ */
+#include "target_cpu.h"
+#include "target_signal.h"
+
 #endif /* QEMU_H */