]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
user: Forward declare TaskState type definition
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 10 Jan 2024 11:41:55 +0000 (12:41 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 6 May 2024 12:13:45 +0000 (14:13 +0200)
Forward declare TaskState in "qemu/typedefs.h" so we can
use it in generic headers like "hw/cpu/core.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240428221450.26460-9-philmd@linaro.org>

bsd-user/qemu.h
include/qemu/typedefs.h
linux-user/qemu.h

index 322177de1624b8eeb5dc90de42466c6c7db3de4b..1780f485d67ded64d72b2d193f3bcb7a63823e5b 100644 (file)
@@ -76,7 +76,7 @@ struct emulated_sigtable {
 /*
  * NOTE: we force a big alignment so that the stack stored after is aligned too
  */
-typedef struct TaskState {
+struct TaskState {
     pid_t ts_tid;     /* tid (or pid) of this task */
 
     struct TaskState *next;
@@ -114,7 +114,7 @@ typedef struct TaskState {
 
     /* This thread's sigaltstack, if it has one */
     struct target_sigaltstack sigaltstack_used;
-} __attribute__((aligned(16))) TaskState;
+} __attribute__((aligned(16)));
 
 static inline TaskState *get_task_state(CPUState *cs)
 {
index 50c277cf0b467f782ba526041b2663207bf70945..36f282572517c43bbcdf2f9eda5ee95b886e4387 100644 (file)
@@ -134,6 +134,7 @@ typedef struct SHPCDevice SHPCDevice;
 typedef struct SSIBus SSIBus;
 typedef struct TCGCPUOps TCGCPUOps;
 typedef struct TCGHelperInfo TCGHelperInfo;
+typedef struct TaskState TaskState;
 typedef struct TranslationBlock TranslationBlock;
 typedef struct VirtIODevice VirtIODevice;
 typedef struct Visitor Visitor;
index 263f445ff1f3f67bc1d1363a1db76245ca494d79..7df4645c2bf844e719b885b6ef96ea5bcda58c01 100644 (file)
@@ -95,7 +95,7 @@ struct emulated_sigtable {
     target_siginfo_t info;
 };
 
-typedef struct TaskState {
+struct TaskState {
     pid_t ts_tid;     /* tid (or pid) of this task */
 #ifdef TARGET_ARM
 # ifdef TARGET_ABI32
@@ -158,7 +158,7 @@ typedef struct TaskState {
 
     /* Start time of task after system boot in clock ticks */
     uint64_t start_boottime;
-} TaskState;
+};
 
 static inline TaskState *get_task_state(CPUState *cs)
 {