diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-06-28 16:54:49 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-06-28 18:04:27 +0000 |
commit | 09effdc9b04a3a04d4f128fd9e1fa360a251ed81 (patch) | |
tree | 0ef789ae1f6e385a9664ca6cb5a9f85f7773bcff /sysdeps/mach/hurd/not-cancel.h | |
parent | d60fdd480d32a9b4bd781cae08e9a8dfb486c3bd (diff) | |
download | glibc-09effdc9b04a3a04d4f128fd9e1fa360a251ed81.tar glibc-09effdc9b04a3a04d4f128fd9e1fa360a251ed81.tar.gz glibc-09effdc9b04a3a04d4f128fd9e1fa360a251ed81.tar.bz2 glibc-09effdc9b04a3a04d4f128fd9e1fa360a251ed81.zip |
hurd: make wait4 a cancellation point
and add _nocancel variant.
* sysdeps/mach/hurd/Makefile [io] (sysdep_routines): Add wait4_nocancel.
* sysdeps/mach/hurd/wait4.c: Include <sysdep-cancel.h>
(__wait4): Surround __proc_wait with enabling async cancel, and use
__USEPORT_CANCEL instead of __USEPORT.
* sysdeps/mach/hurd/wait4_nocancel.c: New file, contains previous
implementation of __wait4.
* sysdeps/mach/hurd/not-cancel.h (__waitpid_nocancel): Replace macro with
__wait4_nocancel declaration with hidden proto, and make
__waitpid_nocancel call __wait4_nocancel.
Diffstat (limited to 'sysdeps/mach/hurd/not-cancel.h')
-rw-r--r-- | sysdeps/mach/hurd/not-cancel.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/not-cancel.h b/sysdeps/mach/hurd/not-cancel.h index 7e824c5f11..69cd781f68 100644 --- a/sysdeps/mach/hurd/not-cancel.h +++ b/sysdeps/mach/hurd/not-cancel.h @@ -63,9 +63,13 @@ __typeof (__writev) __writev_nocancel; /* Non cancellable writev syscall with no status. */ void __writev_nocancel_nostatus (int fd, const struct iovec *vector, int count); -/* For now we have none. Map the name to the normal functions. */ +/* Non cancellable wait4 syscall. */ +__typeof (__wait4) __wait4_nocancel; + # define __waitpid_nocancel(pid, stat_loc, options) \ - __waitpid (pid, stat_loc, options) + __wait4_nocancel (pid, stat_loc, options, NULL) + +/* For now we have none. Map the name to the normal functions. */ #define __fcntl64_nocancel(fd, cmd, ...) \ __fcntl64 (fd, cmd, __VA_ARGS__) @@ -80,6 +84,7 @@ hidden_proto (__write_nocancel) hidden_proto (__pwrite64_nocancel) hidden_proto (__writev_nocancel) hidden_proto (__writev_nocancel_nostatus) +hidden_proto (__wait4_nocancel) #endif #endif /* NOT_CANCEL_H */ |