not-cancel.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* Uncancelable versions of cancelable interfaces. Generic version.
  2. Copyright (C) 2003-2019 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
  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. The GNU C Library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with the GNU C Library; if not, see
  15. <http://www.gnu.org/licenses/>. */
  16. #ifndef NOT_CANCEL_H
  17. # define NOT_CANCEL_H
  18. #include <fcntl.h>
  19. #include <unistd.h>
  20. #include <sys/wait.h>
  21. #include <time.h>
  22. #include <sys/uio.h>
  23. /* By default we have none. Map the name to the normal functions. */
  24. #define __open_nocancel(...) \
  25. __open (__VA_ARGS__)
  26. #define __open64_nocancel(...) \
  27. __open64 (__VA_ARGS__)
  28. #define __openat_nocancel(...) \
  29. __openat (__VA_ARGS__)
  30. #define __openat64_nocancel(...) \
  31. __openat64 (__VA_ARGS__)
  32. #define __close_nocancel(fd) \
  33. __close (fd)
  34. #define __close_nocancel_nostatus(fd) \
  35. (void) __close (fd)
  36. #define __read_nocancel(fd, buf, n) \
  37. __read (fd, buf, n)
  38. #define __write_nocancel(fd, buf, n) \
  39. __write (fd, buf, n)
  40. #define __writev_nocancel_nostatus(fd, iov, n) \
  41. (void) __writev (fd, iov, n)
  42. # define __waitpid_nocancel(pid, stat_loc, options) \
  43. __waitpid (pid, stat_loc, options)
  44. #define __pause_nocancel() \
  45. __pause ()
  46. #define __nanosleep_nocancel(requested_time, remaining) \
  47. __nanosleep (requested_time, remaining)
  48. #define __fcntl64_nocancel(fd, cmd, ...) \
  49. __fcntl64 (fd, cmd, __VA_ARGS__)
  50. #endif /* NOT_CANCEL_H */