diff options
author | Serge Belyshev <belyshev@depni.sinp.msu.ru> | 2022-01-15 14:32:35 +0300 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2022-01-27 16:58:21 +0100 |
commit | ca9946d734147155d6c27b348920125f623a588f (patch) | |
tree | 965c984aab9be8501d4f7908a5f71759932f1301 /linux-user | |
parent | b1b2138753be4a0c9dc50975b080f8e7743b78a9 (diff) |
linux-user/alpha: Fix target rlimits for alpha and rearrange for clarity
Alpha uses different values of some TARGET_RLIMIT_* constants, which were
missing and caused bugs like #577, fixed thus. Also rearranged all three
(alpha, mips and sparc) that differ from everyone else for clarity.
Signed-off-by: Serge Belyshev <belyshev@depni.sinp.msu.ru>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/577
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <87y236lpwb.fsf@depni.sinp.msu.ru>
[lv: replace tabs by spaces]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/syscall_defs.h | 67 |
1 files changed, 32 insertions, 35 deletions
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index f23f0a2178..c8690688b5 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -730,44 +730,41 @@ struct target_rlimit { #define TARGET_RLIM_INFINITY ((abi_ulong)-1) #endif +#define TARGET_RLIMIT_CPU 0 +#define TARGET_RLIMIT_FSIZE 1 +#define TARGET_RLIMIT_DATA 2 +#define TARGET_RLIMIT_STACK 3 +#define TARGET_RLIMIT_CORE 4 #if defined(TARGET_MIPS) -#define TARGET_RLIMIT_CPU 0 -#define TARGET_RLIMIT_FSIZE 1 -#define TARGET_RLIMIT_DATA 2 -#define TARGET_RLIMIT_STACK 3 -#define TARGET_RLIMIT_CORE 4 -#define TARGET_RLIMIT_RSS 7 -#define TARGET_RLIMIT_NPROC 8 -#define TARGET_RLIMIT_NOFILE 5 -#define TARGET_RLIMIT_MEMLOCK 9 -#define TARGET_RLIMIT_AS 6 -#define TARGET_RLIMIT_LOCKS 10 -#define TARGET_RLIMIT_SIGPENDING 11 -#define TARGET_RLIMIT_MSGQUEUE 12 -#define TARGET_RLIMIT_NICE 13 -#define TARGET_RLIMIT_RTPRIO 14 -#else -#define TARGET_RLIMIT_CPU 0 -#define TARGET_RLIMIT_FSIZE 1 -#define TARGET_RLIMIT_DATA 2 -#define TARGET_RLIMIT_STACK 3 -#define TARGET_RLIMIT_CORE 4 -#define TARGET_RLIMIT_RSS 5 -#if defined(TARGET_SPARC) -#define TARGET_RLIMIT_NOFILE 6 -#define TARGET_RLIMIT_NPROC 7 +#define TARGET_RLIMIT_NOFILE 5 +#define TARGET_RLIMIT_AS 6 +#define TARGET_RLIMIT_RSS 7 +#define TARGET_RLIMIT_NPROC 8 +#define TARGET_RLIMIT_MEMLOCK 9 +#elif defined(TARGET_ALPHA) +#define TARGET_RLIMIT_RSS 5 +#define TARGET_RLIMIT_NOFILE 6 +#define TARGET_RLIMIT_AS 7 +#define TARGET_RLIMIT_NPROC 8 +#define TARGET_RLIMIT_MEMLOCK 9 +#elif defined(TARGET_SPARC) +#define TARGET_RLIMIT_RSS 5 +#define TARGET_RLIMIT_NOFILE 6 +#define TARGET_RLIMIT_NPROC 7 +#define TARGET_RLIMIT_MEMLOCK 8 +#define TARGET_RLIMIT_AS 9 #else -#define TARGET_RLIMIT_NPROC 6 -#define TARGET_RLIMIT_NOFILE 7 -#endif -#define TARGET_RLIMIT_MEMLOCK 8 -#define TARGET_RLIMIT_AS 9 -#define TARGET_RLIMIT_LOCKS 10 -#define TARGET_RLIMIT_SIGPENDING 11 -#define TARGET_RLIMIT_MSGQUEUE 12 -#define TARGET_RLIMIT_NICE 13 -#define TARGET_RLIMIT_RTPRIO 14 +#define TARGET_RLIMIT_RSS 5 +#define TARGET_RLIMIT_NPROC 6 +#define TARGET_RLIMIT_NOFILE 7 +#define TARGET_RLIMIT_MEMLOCK 8 +#define TARGET_RLIMIT_AS 9 #endif +#define TARGET_RLIMIT_LOCKS 10 +#define TARGET_RLIMIT_SIGPENDING 11 +#define TARGET_RLIMIT_MSGQUEUE 12 +#define TARGET_RLIMIT_NICE 13 +#define TARGET_RLIMIT_RTPRIO 14 struct target_pollfd { int fd; /* file descriptor */ |