glibc/sysdeps/unix
Adhemerval Zanella 456b3c08b6 io: Refactor close_range and closefrom
Now that Hurd implementis both close_range and closefrom (f2c996597d),
we can make close_range() a base ABI, and make the default closefrom()
implementation on top of close_range().

The generic closefrom() implementation based on __getdtablesize() is
moved to generic close_range().  On Linux it will be overriden by
the auto-generation syscall while on Hurd it will be a system specific
implementation.

The closefrom() now calls close_range() and __closefrom_fallback().
Since on Hurd close_range() does not fail, __closefrom_fallback() is an
empty static inline function set by__ASSUME_CLOSE_RANGE.

The __ASSUME_CLOSE_RANGE also allows optimize Linux
__closefrom_fallback() implementation when --enable-kernel=5.9 or
higher is used.

Finally the Linux specific tst-close_range.c is moved to io and
enabled as default.  The Linuxism and CLOSE_RANGE_UNSHARE are
guarded so it can be built for Hurd (I have not actually test it).

Checked on x86_64-linux-gnu, i686-linux-gnu, and with a i686-gnu
build.
2021-11-24 09:09:37 -03:00
..
alpha Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
arm
bsd Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
i386
inet
mips Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
powerpc
sh
sysv/linux io: Refactor close_range and closefrom 2021-11-24 09:09:37 -03:00
x86_64
confstr.h
get_child_max.c
getlogin_r.c
getlogin.c
getpagesize.c
grantpt.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ifreq.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
Implies
make-syscalls.sh
Makefile Remove the unused +mkdep/+make-deps/s-proto.S/s-proto-cancel.S 2021-11-10 04:54:18 -08:00
setxid.h
sockatmark.c
syscall-template.S
syscall.S
syscalls.list misc: Add time64 alias for ioctl 2021-07-21 11:58:09 +02:00
sysdep.h Linux: Explicitly disable cancellation checking in the dynamic loader 2021-05-10 10:31:41 +02:00