mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-15 01:21:06 +00:00
045c13d185
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
|
||
---|---|---|
.. | ||
aio_read64.c | ||
aio_read.c | ||
aio_write64.c | ||
aio_write.c | ||
creat64.c | ||
dl-fxstatat64.c | ||
fstatfs64.c | ||
fstatvfs64.c | ||
fstatvfs.c | ||
fxstat64.c | ||
fxstat.c | ||
fxstatat64.c | ||
fxstatat.c | ||
getdents64.c | ||
getdents.c | ||
getdirentries64.c | ||
getdirentries.c | ||
glob64.c | ||
internal_statvfs64.c | ||
lio_listio64.c | ||
lio_listio.c | ||
lxstat64.c | ||
lxstat.c | ||
mmap64.c | ||
mmap.c | ||
open64.c | ||
openat64.c | ||
openat.c | ||
readdir64_r.c | ||
readdir64.c | ||
readdir_r.c | ||
readdir.c | ||
sendfile64.c | ||
statfs64.c | ||
statvfs64.c | ||
statvfs.c | ||
syscalls.list | ||
Versions | ||
xstat64.c | ||
xstat.c |