summary refs log tree commit diff stats
path: root/linux-user/mips/cpu_loop.c
diff options
context:
space:
mode:
authorAleksandar Markovic <amarkovic@wavecomp.com>2019-06-28 12:43:37 +0200
committerLaurent Vivier <laurent@vivier.eu>2019-07-02 16:56:46 +0200
commit1272a6c4883db77e08a9cff1d2d3d1fa1f420865 (patch)
tree90f9e47a51a6f1668958e69c01e842ccef2bd12e /linux-user/mips/cpu_loop.c
parentbf9136722c47ce964715fa3fcff4b16cbbd08d58 (diff)
downloadfocaccia-qemu-1272a6c4883db77e08a9cff1d2d3d1fa1f420865.tar.gz
focaccia-qemu-1272a6c4883db77e08a9cff1d2d3d1fa1f420865.zip
linux-user: Introduce TARGET_HAVE_ARCH_STRUCT_FLOCK
Bring target_flock definitions to be more in sync with the way
flock is defined in kernel.

Basically, the rules from the kernel are:

1. Majority of architectures have a common flock definition.

2. Architectures with 32-bit MIPS ABIs have a sligtly different
flock definition; those architectures are the only arcitectures
that have HAVE_ARCH_STRUCT_FLOCK defined, and that preprocessor
constant is used in the common header as a flag for including or
not including common flock definition.

3. Sparc architectures also have a sligtly different flock
definition, but the difference is only the padding at the end of
the structure. The presence of that padding is determined by
preprocessor constants __ARCH_FLOCK6_PAD and __ARCH_FLOCK64_PAD.

QEMU linux-user already implements rules 1. and 3. in a very
similar way as they are implemented in kernel. However, rule 2.
is implemented in a dissimilar way (for example, the constant
TARGET_HAVE_ARCH_STRUCT_FLOCK is missing), and this patch brings
QEMU implementation much closer to the kernel implementation.
TARGET_HAVE_ARCH_STRUCT_FLOCK64 constant is also introduced to
mimic HAVE_ARCH_STRUCT_FLOCK64 from kernel, but it is not defined
anywhere, however, this is the case with HAVE_ARCH_STRUCT_FLOCK64
in kernel as well.

Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <1561718618-20218-5-git-send-email-aleksandar.markovic@rt-rk.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/mips/cpu_loop.c')
0 files changed, 0 insertions, 0 deletions