glibc/include
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
..
arpa resolv: Move ns_samename into its own file, and into libc 2021-07-19 07:56:21 +02:00
bits nptl: Extract <bits/atomic_wide_counter.h> from pthread_cond_common.c 2021-11-17 12:20:13 +01:00
gnu Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
net
netinet
programs xmalloc: Fix warnings with gcc analyzer 2021-07-28 17:45:14 +05:30
protocols
rpc Handle out-of-memory case in svc_tcp.c/svc_unix.c:rendezvous_request. 2020-12-10 11:11:20 +01:00
rpcsvc
sys misc: Add __get_nprocs_sched 2021-09-27 09:13:06 -03:00
aio.h Linux: Move aio_suspend, aio_suspend64, __aio_suspend_time64 to libc 2021-06-25 11:55:27 +02:00
aliases.h
alloc_buffer.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
alloca.h
allocate_once.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ar.h
argp-fmtstream.h
argp.h
argz.h
array_length.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
assert.h
atomic_wide_counter.h nptl: Extract <bits/atomic_wide_counter.h> from pthread_cond_common.c 2021-11-17 12:20:13 +01:00
atomic.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
byteswap.h
clone_internal.h Add an internal wrapper for clone, clone2 and clone3 2021-07-14 06:33:58 -07:00
complex.h
cpio.h
crypt.h
ctype.h
des.h
dirent.h Use 64 bit time_t stat internally 2021-06-22 12:09:52 -03:00
dlfcn.h elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols 2021-07-07 08:41:24 +02:00
dso_handle.h
elf.h
endian.h
envz.h
err.h
errno.h Remove tls.h inclusion from internal errno.h 2020-11-13 12:59:19 -03:00
error.h
execinfo.h
fcntl.h
features-time64.h y2038: Add support for 64-bit time on legacy ABIs 2021-06-15 10:42:11 -03:00
features.h Prepare for glibc 2.34 release. 2021-08-01 21:24:04 -04:00
fenv.h
file_change_detection.h Use 64 bit time_t stat internally 2021-06-22 12:09:52 -03:00
filename.h Import filename.h from gnulib 2021-01-05 11:33:16 -03:00
float.h
fmtmsg.h
fnmatch.h
fpu_control.h
fstab.h
fts.h io: Add fts64 with 64-bit time_t support 2021-06-15 10:42:11 -03:00
ftw.h io: Add ftw64 with 64-bit time_t support 2021-06-15 10:42:11 -03:00
gconv.h
getopt_int.h
getopt.h
glob.h Fix extra PLT reference in libc.so due to __glob64_time64 if build with gcc 7.5 on 32bit. 2021-07-01 16:46:59 +02:00
gmp.h
gnu-versions.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
grp-merge.h
grp.h
gshadow.h
iconv.h
idx.h Import idx.h from gnulib 2021-01-05 11:33:16 -03:00
ifaddrs.h
ifreq.h
ifunc-impl-list.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
inline-hashtab.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
intprops.h regex: copy back from Gnulib 2021-09-21 08:00:44 -07:00
inttypes.h Make strtoimax, strtoumax, wcstoimax, wcstoumax into aliases 2020-12-08 18:15:27 +00:00
langinfo.h
lastlog.h
libc-diag.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libc-internal.h nptl: Move pthread_create, thrd_create into libc 2021-05-21 22:35:00 +02:00
libc-pointer-arith.h Add cast_to_pointer to cast an integer to void * pointer 2021-05-22 05:09:15 -07:00
libc-symbols.h nss_files: Move into libc 2021-07-07 18:33:52 +02:00
libgen.h
libintl.h
limits.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
link.h elf: Fix slow DSO sorting behavior in dynamic loader (BZ #17645) 2021-10-21 11:23:53 -03:00
list_t.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
list.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
locale.h
loop_unroll.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
malloc.h Simplify __malloc_initialized 2021-07-22 18:38:04 +05:30
math-narrow-eval.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
math.h Redirect fma calls to __fma in libm 2021-09-15 22:57:35 +00:00
mcheck.h mcheck: Wean away from malloc hooks [BZ #23489] 2021-07-22 18:38:02 +05:30
memory.h
mntent.h
monetary.h
mqueue.h Linux: Move mq_send, mq_timedsend, __mq_timedsend_time64 to libc 2021-06-25 12:21:12 +02:00
netdb.h nss_files: Move into libc 2021-07-07 18:33:52 +02:00
netgroup.h
nl_types.h
nss_dns.h nss: Directly load nss_dns, without going through dlsym/dlopen 2021-07-19 07:56:57 +02:00
nss_files.h nss: Access nss_files through direct references 2021-07-07 18:33:52 +02:00
nss.h
nsswitch.h
obstack.h
plural-exp.h
poll.h
printf.h
pthread.h Linux: Move mq_notify from librt to libc 2021-06-25 12:20:47 +02:00
pty.h login: Move libutil into libc 2021-06-30 08:43:37 +02:00
pwd.h
random-bits.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
re_comp.h
regex.h regex: copy back from Gnulib 2021-09-21 08:00:44 -07:00
regexp.h
register-atfork.h posix: Consolidate register-atfork 2021-03-12 10:19:22 -03:00
resolv.h resolv: Move res_queriesmatch to its own file and into libc 2021-07-19 07:56:21 +02:00
rounding-mode.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
rtld-malloc.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sched.h
scratch_buffer.h malloc: Add scratch_buffer_dupfree 2021-01-05 11:33:16 -03:00
search.h
set-hooks.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
setjmp.h setjmp: Replace jmp_buf-macros.h with jmp_buf-macros.sym 2021-11-22 13:43:22 -03:00
sgtty.h
shadow.h
shlib-compat.h Force building with -fno-common 2021-07-09 20:09:14 +02:00
shm-directory.h nptl: Move sem_close, sem_open into libc 2021-05-05 17:19:38 +02:00
signal.h hurd: keep only required PLTs in ld.so 2020-11-11 02:36:22 +01:00
spawn.h
stab.h
stackinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stap-probe.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stdc-predef.h Define __STDC_IEC_60559_BFP__ and __STDC_IEC_60559_COMPLEX__ 2021-09-24 20:11:56 +00:00
stdint.h
stdio_ext.h
stdio.h libio: Replace internal _IO_getdelim symbol with __getdelim 2021-07-07 18:33:52 +02:00
stdlib.h Remove __morecore and __default_morecore 2021-07-22 18:37:57 +05:30
string.h String: Add hidden defs for __memcmpeq() to enable internal usage 2021-10-26 16:51:29 -05:00
strings.h
struct___timeb64.h time: Add 64-bit time_t support for ftime 2020-10-27 09:54:50 -03:00
struct___timespec64.h
struct___timeval64.h
stubs-prologue.h
syscall.h
sysexits.h
syslog.h
tar.h
termios.h
tgmath.h
time.h time: Fix overflow itimer tests on 32-bit systems 2021-08-15 07:09:58 +09:00
ttyent.h
uchar.h
ucontext.h
ulimit.h
unistd.h io: Refactor close_range and closefrom 2021-11-24 09:09:37 -03:00
utime.h
utmp.h login: Move libutil into libc 2021-06-30 08:43:37 +02:00
values.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
verify.h
wait.h
wchar.h
wctype.h
wordexp.h