aboutsummaryrefslogtreecommitdiff
path: root/linux-user/qemu.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-01-14 15:37:30 +0000
committerLaurent Vivier <laurent@vivier.eu>2022-01-27 14:19:43 +0100
commitb1b2138753be4a0c9dc50975b080f8e7743b78a9 (patch)
treea24c0392a851adcc5cb09bf6fcbf45fa7bba9af6 /linux-user/qemu.h
parent48302d4eb628ff0bea4d7e92cbf6b726410eb4c3 (diff)
linux-user: Remove unnecessary 'aligned' attribute from TaskState
The linux-user struct TaskState has an 'aligned(16)' attribute. When the struct was first added in commit 851e67a1b46f in 2003, there was a justification in a comment (still present in the source today): /* NOTE: we force a big alignment so that the stack stored after is aligned too */ because the final field in the struct was "uint8_t stack[0];" But that field was removed in commit 48e15fc2d in 2010 which switched us to allocating the stack and the TaskState separately. Because we allocate the structure with g_new0() rather than as a local variable, the attribute made no difference to the alignment of the structure anyway. Remove the unnecessary attribute, and the corresponding comment. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20220114153732.3767229-2-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/qemu.h')
-rw-r--r--linux-user/qemu.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 7910ce59cc..9d2b3119d1 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -94,10 +94,6 @@ struct emulated_sigtable {
target_siginfo_t info;
};
-/*
- * NOTE: we force a big alignment so that the stack stored after is
- * aligned too
- */
typedef struct TaskState {
pid_t ts_tid; /* tid (or pid) of this task */
#ifdef TARGET_ARM
@@ -158,7 +154,7 @@ typedef struct TaskState {
/* This thread's sigaltstack, if it has one */
struct target_sigaltstack sigaltstack_used;
-} __attribute__((aligned(16))) TaskState;
+} TaskState;
abi_long do_brk(abi_ulong new_brk);