diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-07-15 16:50:47 +0100 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2016-08-04 16:36:53 +0300 |
commit | 005eb2ae1ff6728de7e6998b7456bd72d4456383 (patch) | |
tree | 6370d34caba51bd895efba82080f6164313229e5 /linux-user/x86_64 | |
parent | 332c9781f6a7c496adf605a1be72776598c7adc2 (diff) |
linux-user: Fix target_semid_ds structure definition
The target_semid_ds structure is not correct for all
architectures: the padding fields should only exist for:
* 32-bit ABIs
* x86
It is also misnamed, since it is following the kernel
semid64_ds structure (QEMU doesn't support the legacy
semid_ds structure at all). Rename the struct, provide
a correct generic definition and allow the oddball x86
architecture to provide its own version.
This fixes broken SYSV semaphores for all our 64-bit
architectures except x86 and ppc.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/x86_64')
-rw-r--r-- | linux-user/x86_64/target_structs.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/linux-user/x86_64/target_structs.h b/linux-user/x86_64/target_structs.h index 348982703e..b6e82a822c 100644 --- a/linux-user/x86_64/target_structs.h +++ b/linux-user/x86_64/target_structs.h @@ -55,4 +55,19 @@ struct target_shmid_ds { abi_ulong __unused5; }; +/* The x86 definition differs from the generic one in that the + * two padding fields exist whether the ABI is 32 bits or 64 bits. + */ +#define TARGET_SEMID64_DS +struct target_semid64_ds { + struct target_ipc_perm sem_perm; + abi_ulong sem_otime; + abi_ulong __unused1; + abi_ulong sem_ctime; + abi_ulong __unused2; + abi_ulong sem_nsems; + abi_ulong __unused3; + abi_ulong __unused4; +}; + #endif |