aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/Makefile1
-rw-r--r--sysdeps/unix/sysv/linux/Versions1
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/cpu-features.c1
-rw-r--r--sysdeps/unix/sysv/linux/close_nocancel_nostatus.c28
-rw-r--r--sysdeps/unix/sysv/linux/not-cancel.h12
-rw-r--r--sysdeps/unix/sysv/linux/riscv/sysdep.h3
-rw-r--r--sysdeps/unix/sysv/linux/termios_internals.h2
7 files changed, 38 insertions, 10 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index c6b2db8..c47cbdf 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -612,6 +612,7 @@ endif
ifeq ($(subdir),io)
sysdep_routines += \
close_nocancel \
+ close_nocancel_nostatus \
fallocate \
fallocate64 \
fcntl_nocancel \
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
index b721331..585dec7 100644
--- a/sysdeps/unix/sysv/linux/Versions
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -346,6 +346,7 @@ libc {
__read_nocancel;
__pread64_nocancel;
__close_nocancel;
+ __close_nocancel_nostatus;
__sigtimedwait;
# functions used by nscd
__netlink_assert_response;
diff --git a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c
index 6d63c8a..1acc82d 100644
--- a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c
+++ b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c
@@ -23,6 +23,7 @@
#include <sys/prctl.h>
#include <sys/utsname.h>
#include <dl-tunables-parse.h>
+#include <dl-symbol-redir-ifunc.h>
#define DCZID_DZP_MASK (1 << 4)
#define DCZID_BS_MASK (0xf)
diff --git a/sysdeps/unix/sysv/linux/close_nocancel_nostatus.c b/sysdeps/unix/sysv/linux/close_nocancel_nostatus.c
new file mode 100644
index 0000000..b1df5ed
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/close_nocancel_nostatus.c
@@ -0,0 +1,28 @@
+/* Linux close syscall implementation -- non-cancellable, no errno update.
+ Copyright (C) 2025 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <unistd.h>
+#include <sysdep-cancel.h>
+#include <not-cancel.h>
+
+void
+__close_nocancel_nostatus (int fd)
+{
+ INTERNAL_SYSCALL_CALL (close, fd);
+}
+libc_hidden_def (__close_nocancel_nostatus)
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index ece3297..5ac6dd4 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -53,6 +53,9 @@ __typeof (__write) __write_nocancel;
/* Uncancelable close. */
__typeof (__close) __close_nocancel;
+/* Uncancellable close that does not also set errno in case of failure. */
+void __close_nocancel_nostatus (int);
+
/* Uncancelable fcntl. */
int __fcntl64_nocancel (int, int, ...);
@@ -65,17 +68,10 @@ hidden_proto (__read_nocancel)
hidden_proto (__pread64_nocancel)
hidden_proto (__write_nocancel)
hidden_proto (__close_nocancel)
+hidden_proto (__close_nocancel_nostatus)
hidden_proto (__fcntl64_nocancel)
#endif
-/* Non cancellable close syscall that does not also set errno in case of
- failure. */
-static inline void
-__close_nocancel_nostatus (int fd)
-{
- __close_nocancel (fd);
-}
-
/* Non cancellable writev syscall that does not also set errno in case of
failure. */
static inline void
diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h
index ee015df..05e0e05 100644
--- a/sysdeps/unix/sysv/linux/riscv/sysdep.h
+++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h
@@ -145,11 +145,12 @@
# define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres"
# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime"
# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"
+# define HAVE_GETRANDOM_VSYSCALL "__vdso_getrandom"
# else
# define VDSO_NAME "LINUX_5.4"
# define VDSO_HASH 61765876
-/* RV32 does not support the gettime VDSO syscalls. */
+/* RV32 does not support the gettime and getrandom VDSO syscalls. */
# endif
# define HAVE_CLONE3_WRAPPER 1
diff --git a/sysdeps/unix/sysv/linux/termios_internals.h b/sysdeps/unix/sysv/linux/termios_internals.h
index 10b6732..e8dbfe7 100644
--- a/sysdeps/unix/sysv/linux/termios_internals.h
+++ b/sysdeps/unix/sysv/linux/termios_internals.h
@@ -59,7 +59,7 @@ struct termios2
format and function as TCGETS2. On all other platforms, the termios2
interface exists as far back as this version of glibc supports.
- For TCGETS* it is more complicated; this is handled in tcsetattr.c.
+ For TCSETS* it is more complicated; this is handled in tcsetattr.c.
Some other architectures only have the equivalent of the termios2
interface, in which case the old ioctl names are the only ones