@samitouri / QOSamiQemu / commits / 07e701716b

linux-user: Move cpu_copy() to user-internals.h

We only use cpu_copy() inside linux-user, so we don't need to have the prototype in qemu.h available to code outside linux-user; move it to user-internals.h. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Helge Deller <deller@gmx.de> Signed-off-by: Helge Deller <deller@gmx.de>

Peter Maydell committed May 26, 2026 at 16:17 UTC 07e701716b43da1a86c1045871c1eb613cf5e53a
2 files changed +3 -3
linux-user/qemu.h
-3
@@ -368,7 +368,4 @@ void *lock_user_string(abi_ulong guest_addr);
368 #define unlock_user_struct(host_ptr, guest_addr, copy) \
369 unlock_user(host_ptr, guest_addr, (copy) ? sizeof(*host_ptr) : 0)
370
371 -/* Clone cpu state */
372 -CPUArchState *cpu_copy(CPUArchState *env);
373 -
371 #endif /* QEMU_H */
linux-user/user-internals.h
+3
@@ -209,6 +209,9 @@ static inline void begin_parallel_context(CPUState *cs)
209 */
210 void init_main_thread(CPUState *cs, struct image_info *info);
211
212 +/* Clone cpu state */
213 +CPUArchState *cpu_copy(CPUArchState *env);
214 +
215 /*
216 * Include target-specific struct and function definitions;
217 * they may need access to the target-independent structures