[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/24] exec/user: Move 'thunk.h' from 'exec/user' to 'user'
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 01/24] exec/user: Move 'thunk.h' from 'exec/user' to 'user' |
Date: |
Mon, 29 Apr 2024 00:14:27 +0200 |
Keep all user emulation headers under the same user/ directory.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
bsd-user/qemu.h | 2 +-
include/{exec => }/user/thunk.h | 8 ++++++--
linux-user/user-internals.h | 2 +-
linux-user/thunk.c | 2 +-
4 files changed, 9 insertions(+), 5 deletions(-)
rename include/{exec => }/user/thunk.h (97%)
diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
index 63ee07d534..e562adde65 100644
--- a/bsd-user/qemu.h
+++ b/bsd-user/qemu.h
@@ -26,7 +26,7 @@
extern char **environ;
-#include "exec/user/thunk.h"
+#include "user/thunk.h"
#include "target_arch.h"
#include "syscall_defs.h"
#include "target_syscall.h"
diff --git a/include/exec/user/thunk.h b/include/user/thunk.h
similarity index 97%
rename from include/exec/user/thunk.h
rename to include/user/thunk.h
index 2ebfecf58e..b97def8d53 100644
--- a/include/exec/user/thunk.h
+++ b/include/user/thunk.h
@@ -17,8 +17,12 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef THUNK_H
-#define THUNK_H
+#ifndef USER_THUNK_H
+#define USER_THUNK_H
+
+#ifndef CONFIG_USER_ONLY
+#error Cannot include this header from system emulation
+#endif
#include "cpu.h"
#include "exec/user/abitypes.h"
diff --git a/linux-user/user-internals.h b/linux-user/user-internals.h
index ce11d9e21c..5c7f173ceb 100644
--- a/linux-user/user-internals.h
+++ b/linux-user/user-internals.h
@@ -18,7 +18,7 @@
#ifndef LINUX_USER_USER_INTERNALS_H
#define LINUX_USER_USER_INTERNALS_H
-#include "exec/user/thunk.h"
+#include "user/thunk.h"
#include "exec/exec-all.h"
#include "exec/tb-flush.h"
#include "qemu/log.h"
diff --git a/linux-user/thunk.c b/linux-user/thunk.c
index 071aad4b5f..3cd19e79c6 100644
--- a/linux-user/thunk.c
+++ b/linux-user/thunk.c
@@ -20,7 +20,7 @@
#include "qemu/log.h"
#include "qemu.h"
-#include "exec/user/thunk.h"
+#include "user/thunk.h"
//#define DEBUG
--
2.41.0
- [PATCH 00/24] exec: Rework around CPUState user fields (part 2), Philippe Mathieu-Daudé, 2024/04/28
- [PATCH 01/24] exec/user: Move 'thunk.h' from 'exec/user' to 'user',
Philippe Mathieu-Daudé <=
- [PATCH 02/24] coverity: Update user emulation regexp, Philippe Mathieu-Daudé, 2024/04/28
- [PATCH 03/24] accel/tcg: Move user definition of cpu_interrupt() to user-exec.c, Philippe Mathieu-Daudé, 2024/04/28
- [PATCH 04/24] accel/tcg: Duplicate cpu_exit() for user / system, Philippe Mathieu-Daudé, 2024/04/28
- [PATCH 05/24] accel/tcg: Extract tcg_cpu_exit() from cpu_exit(), Philippe Mathieu-Daudé, 2024/04/28
- [PATCH 06/24] accel: Introduce AccelOpsClass::exit_vcpu_thread() handler, Philippe Mathieu-Daudé, 2024/04/28