aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/not-cancel.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-06-28 14:27:36 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-06-28 15:11:23 +0000
commit4cafcd839f8c002c290ec96c64b6d85e87e270e8 (patch)
treec05a300192173a1d1f3c593534703aaf0a6c374b /sysdeps/mach/hurd/not-cancel.h
parent67a78072e2891b8b16a7bfb20675844a5854cff1 (diff)
downloadglibc-4cafcd839f8c002c290ec96c64b6d85e87e270e8.tar
glibc-4cafcd839f8c002c290ec96c64b6d85e87e270e8.tar.gz
glibc-4cafcd839f8c002c290ec96c64b6d85e87e270e8.tar.bz2
glibc-4cafcd839f8c002c290ec96c64b6d85e87e270e8.zip
hurd: make open and openat cancellation points
and add _nocancel variants. * sysdeps/mach/hurd/Makefile [io] (sysdep_routines): Add open_nocancel openat_nocancel. * sysdeps/mach/hurd/Versions (libc.GLIBC_PRIVATE, ld.GLIBC_PRIVATE): Add __open_nocancel. * sysdeps/mach/hurd/dl-sysdep.c (__open_nocancel): Add alias, check it is not hidden. * sysdeps/mach/hurd/i386/localplt.data (__open_nocancel): Allow PLT. * sysdeps/mach/hurd/not-cancel.h (__open_nocancel, __openat_nocancel: Replace macros with declarations with hidden proto. (__open64_nocancel, __openat64_nocancel): Call __open_nocancel and __openat_nocancel instead of __open64 and __openat64. * sysdeps/mach/hurd/open.c: Include <sysdep-cancel.h> (__libc_open): Surround __file_name_lookup with enabling async cancel. * sysdeps/mach/hurd/openat.c: Likewise. * sysdeps/mach/hurd/open_nocancel.c, sysdeps/mach/hurd/openat_nocancel.c: New files.
Diffstat (limited to 'sysdeps/mach/hurd/not-cancel.h')
-rw-r--r--sysdeps/mach/hurd/not-cancel.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/sysdeps/mach/hurd/not-cancel.h b/sysdeps/mach/hurd/not-cancel.h
index 202dca8792..c627ec7bde 100644
--- a/sysdeps/mach/hurd/not-cancel.h
+++ b/sysdeps/mach/hurd/not-cancel.h
@@ -29,19 +29,23 @@
#include <hurd/fd.h>
/* For now we have none. Map the name to the normal functions. */
-#define __open_nocancel(...) \
- __open (__VA_ARGS__)
-#define __open64_nocancel(...) \
- __open64 (__VA_ARGS__)
-#define __openat_nocancel(...) \
- __openat (__VA_ARGS__)
-#define __openat64_nocancel(...) \
- __openat64 (__VA_ARGS__)
#define __close_nocancel(fd) \
__close (fd)
void __close_nocancel_nostatus (int fd);
+/* Non cancellable open syscall. */
+__typeof (__open) __open_nocancel;
+/* open64 is just the same as open for us. */
+#define __open64_nocancel(...) \
+ __open_nocancel (__VA_ARGS__)
+
+/* Non cancellable openat syscall. */
+__typeof (__openat) __openat_nocancel;
+/* open64 is just the same as open for us. */
+#define __openat64_nocancel(...) \
+ __openat_nocancel (__VA_ARGS__)
+
/* Non cancellable read syscall. */
__typeof (__read) __read_nocancel;
@@ -66,6 +70,8 @@ void __writev_nocancel_nostatus (int fd, const struct iovec *vector, int count);
__fcntl64 (fd, cmd, __VA_ARGS__)
#if IS_IN (libc)
+hidden_proto (__open_nocancel)
+hidden_proto (__openat_nocancel)
hidden_proto (__read_nocancel)
hidden_proto (__pread64_nocancel)
hidden_proto (__write_nocancel)