mirror of git://sourceware.org/git/glibc.git
This patch consolidates all Linux setrlimit and getrlimit on the default
sysdeps/unix/sysv/linux/{set,get}rlimit{64}.c. It contains two exceptions:
1. mips32 and mips64n32 which requires a versioned symbol for GLIBC 2.19
and higher due a broken RLIM64_INFINITY constant.
2. sparc32 does not define a compat symbol for getrlimit64 for old 2GB
limit. I am not sure if it is required, but a RLIM_INFINITY fix [1]
change its definition without adding a compat symbol. This patch does
not aim to address this possible issue, it follow current symbol
export.
The default implementation uses prlimit64 for 64 bit rlim_t ({set,get}rlimit64)
and if it fails with ENOSYS it fall back to {get,set}rlimit syscall. This
code path is only used on kernel older than 2.6.36 (basically now only x86)
and I avoid to user __ASSUME_PRLIMTI64 to simplify the implementation. Once
x86 moves to be on par with other architectures regarding minimum kernel
supported we can get rid of using old syscalls and default path.
A new type size define is added, __RLIM_T_MATCHES_RLIM64_T, where is set as
default for 64 bits ports. This allows the default implementation to avoid
{get,set}rlimit building and alias {get,set}rlimit64 to {get,set}rlimit.
Checked on x86_64, i386, armhf, aarch64, and powerpc64le. I also did a
sanity build plus check-abi on all other supported architectures.
[1] Commit
|
||
|---|---|---|
| .. | ||
| a.out.h | ||
| dirent.h | ||
| elfclass.h | ||
| epoll.h | ||
| errno.h | ||
| eventfd.h | ||
| fcntl.h | ||
| inotify.h | ||
| ioctls.h | ||
| ipc.h | ||
| local_lim.h | ||
| mman.h | ||
| msq.h | ||
| netdb.h | ||
| pthreadtypes.h | ||
| resource.h | ||
| sem.h | ||
| semaphore.h | ||
| shm.h | ||
| sigaction.h | ||
| signalfd.h | ||
| signum.h | ||
| sigstack.h | ||
| socket_type.h | ||
| stat.h | ||
| statfs.h | ||
| termios.h | ||
| timerfd.h | ||
| typesizes.h | ||
| wordsize.h | ||