summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sparc/bits/resource.h
AgeCommit message (Collapse)Author
2023-11-17rlimit: fix 64-bit RLIM64_INFINITY macroPavel Kozlov
Linux kernel returns -1ULL as RLIM64_INFINITY for all cpus. Fix RLIM64_INFINTIY and 64-bit variant of RLIM_INFINITY macro for sparc, mips, alpha, as for these CPUs the library uses different value than what the kernel sets and it can cause incorrect RLIM64_INFINTY check. Because alpha is a 64-bit arch, fix the RLIM_INFINITY macro twice (the value should be the same with and without __USE_FILE_OFFSET64 definition) to match the prlimit64 syscall in the kernel. Previous implementation of setrlimit/getrlimit functions didn't use prlimit64 syscall and didn't receive RLIM64_INFINTIY from the kernel, RLIM64_INFINTY macro was used by the library itself to mimic the 64-bit rlimit in the getrlimit64/setrlimit64 functions, that allowed to have RLIM64_INFINTIY different from what the kernel sets. New implementation of setrlimit/getrlimit uses prlimit64 and checks for RLIM64_INFINITY value and must have equal RLIM64_INFINITY definition with what the kernel uses. This issue is indicated by the tst-rlim/tst-rlim64 tests on sparc/mips32/alpha, tests return 23 (UNSUPPORTED) because of incorrect RLIM_INFINTY check for available rlimit type. This patch will require rebuild of sparc/mips32/alpha binaries that explicitly use RLIM64_INFINTY or 64-bit variant of RLIM_INFINITY (if binary for 32-bit CPU was built with _FILE_OFFSET_BITS=64) to update the macro value. Signed-off-by: Pavel Kozlov <pavel.kozlov@synopsys.com>
2022-08-08resource.h: add missing RUSAGE_THREADWaldemar Brodkorb
There is a real-world usage of RUSAGE_THREAD by the pistache project, https://github.com/oktal/pistache. Reported-By: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-05-20define RLIMIT_RTTIME, bump RLIMIT_NLIMITSRomain Naour
This macro exists since Linux 2.6.25 [1] and is defined in glibc since 2.14 [2] for sparc and most supported architectures. RLIMIT_RTTIME has been added later for mips [3] and alpha [4]. For example, RLIMIT_RTTIME is needed to build qemu 7.0.0 with Linux user-land emulation support [5]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=78f2c7db6068fd6ef75b8c120f04a388848eacb5 [2] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=67f86a251e0d36107fe28999281d46e76941c7b9 [3] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=8969f4df1a526aa60dd0bc1c4736cf02104d4a05 [4] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=53c2cb7641bd866398156625ef672bbd2d78a0d8 [5] https://git.qemu.org/?p=qemu.git;a=commitdiff;h=244fd08323088db73590ff2317dfe86f810b51d7 Signed-off-by: Romain Naour <romain.naour@gmail.com>
2017-05-24sparc: cleanup sparc64 bits and unused soft-fpWaldemar Brodkorb
Remove a lot of unused 64 Bit header stuff.
2012-11-18Replace FSF snail mail address with URLsMike Frysinger
This matches a similar change made to glibc. No functional changes here. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2005-12-01sync with glibcMike Frysinger
2001-11-14Sync up sparc headersEric Andersen
2001-03-06I just grabbed the bits dir from glibc 2.1.3 on a sparc boxEric Andersen
to facilitate the sparc porting work being done by Mathew Bosworth. -Erik