1 /* Uncancelable versions of cancelable interfaces. Hurd version. 2 Copyright (C) 2003-2021 Free Software Foundation, Inc. 3 This file is part of the GNU C Library. 4 5 The GNU C Library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 The GNU C Library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with the GNU C Library; if not, see 17 <https://www.gnu.org/licenses/>. */ 18 19 #ifndef NOT_CANCEL_H 20 # define NOT_CANCEL_H 21 22 #include <fcntl.h> 23 #include <unistd.h> 24 #include <sys/wait.h> 25 #include <time.h> 26 #include <sys/uio.h> 27 #include <hurd.h> 28 #include <hurd/fd.h> 29 30 /* Non cancellable close syscall. */ 31 __typeof (__close) __close_nocancel; 32 33 void __close_nocancel_nostatus (int fd); 34 35 /* Non cancellable open syscall. */ 36 __typeof (__open) __open_nocancel; 37 /* open64 is just the same as open for us. */ 38 #define __open64_nocancel(...) \ 39 __open_nocancel (__VA_ARGS__) 40 41 /* Non cancellable openat syscall. */ 42 __typeof (__openat) __openat_nocancel; 43 /* open64 is just the same as open for us. */ 44 #define __openat64_nocancel(...) \ 45 __openat_nocancel (__VA_ARGS__) 46 47 /* Non cancellable read syscall. */ 48 __typeof (__read) __read_nocancel; 49 50 /* Non cancellable pread syscall (LFS version). */ 51 __typeof (__pread64) __pread64_nocancel; 52 53 /* Non cancellable write syscall. */ 54 __typeof (__write) __write_nocancel; 55 56 /* Non cancellable pwrite syscall (LFS version). */ 57 __typeof (__pwrite64) __pwrite64_nocancel; 58 59 /* Non cancellable writev syscall. */ 60 __typeof (__writev) __writev_nocancel; 61 62 /* Non cancellable writev syscall with no status. */ 63 void __writev_nocancel_nostatus (int fd, const struct iovec *vector, int count); 64 65 /* Non cancellable wait4 syscall. */ 66 __typeof (__wait4) __wait4_nocancel; 67 68 # define __waitpid_nocancel(pid, stat_loc, options) \ 69 __wait4_nocancel (pid, stat_loc, options, NULL) 70 71 /* Non cancellable fcntl syscall. */ 72 __typeof (__fcntl) __fcntl_nocancel; 73 /* fcntl64 is just the same as fcntl for us. */ 74 #define __fcntl64_nocancel(...) \ 75 __fcntl_nocancel (__VA_ARGS__) 76 77 #if IS_IN (libc) 78 hidden_proto (__close_nocancel) 79 hidden_proto (__close_nocancel_nostatus) 80 hidden_proto (__open_nocancel) 81 hidden_proto (__openat_nocancel) 82 hidden_proto (__read_nocancel) 83 hidden_proto (__pread64_nocancel) 84 hidden_proto (__write_nocancel) 85 hidden_proto (__pwrite64_nocancel) 86 hidden_proto (__writev_nocancel) 87 hidden_proto (__writev_nocancel_nostatus) 88 hidden_proto (__wait4_nocancel) 89 hidden_proto (__fcntl_nocancel) 90 #endif 91 92 #endif /* NOT_CANCEL_H */ 93