]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Consolidate remaning non cancellable definitions
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 23 Aug 2017 13:40:14 +0000 (10:40 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 23 Aug 2017 13:47:03 +0000 (10:47 -0300)
This patch consolidate the remaning non cancellable syscall definitions
on not-cancel.h header.  They are:

  * __fcntl_nocancel: Moved from fcntl.h to not-cancel.h.
  * __sigsuspend_nocancel: Removed since 988f991b50 it is not used or
    defined anymore.
  * __nanosleep_nocancel: Removed since 6f33fd046b it is defined on
    not-cancel.h.

Now all non-cancellable syscall definition are defined on not-cancel
(the only exceptions is the stdio symbol __fxprintf_nocancel which
uses non cancellable open and it is used on getopt implementation).

Checked on x86_64-linux-gnu and with build-many-glibc.py.

* include/fcntl.h (__fcntl_nocancel): Remove definition.
* include/signal.h (__sigsuspend_nocancel): Likewise.
* include/time.h (__nanosleep_nocancel): Likewise.
* sysdeps/generic/not-cancel.h (__fcntl_nocancel): New macro.
* login/utmp_file.c: Include non cancellable syscall header.
* sysdeps/unix/sysv/linux/not-cancel.h (__fcntl_nocancel): New
prototype.

ChangeLog
include/fcntl.h
include/signal.h
include/time.h
login/utmp_file.c
sysdeps/generic/not-cancel.h
sysdeps/unix/sysv/linux/not-cancel.h

index a58de05af64808e70e45794bbc4a12ef2eccd681..59715f316144a606c345851bef8c12c2f800ec50 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2017-08-23  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+       * include/fcntl.h (__fcntl_nocancel): Remove definition.
+       * include/signal.h (__sigsuspend_nocancel): Likewise.
+       * include/time.h (__nanosleep_nocancel): Likewise.
+       * sysdeps/generic/not-cancel.h (__fcntl_nocancel): New macro.
+       * login/utmp_file.c: Include non cancellable syscall header.
+       * sysdeps/unix/sysv/linux/not-cancel.h (__fcntl_nocancel): New
+       prototype.
+
 2017-08-23  H.J. Lu  <hongjiu.lu@intel.com>
 
        * sysdeps/x86_64/fpu/svml_d_sincos8_core.S: Replace AVX512F
index 9a007c358ce28d18bfed4df45987f19cddaa4654..3d68c5ec67069bac0b5b276086ac44da85599034 100644 (file)
@@ -9,10 +9,7 @@ extern int __libc_open64 (const char *file, int oflag, ...);
 extern int __libc_open (const char *file, int oflag, ...);
 libc_hidden_proto (__libc_open)
 extern int __libc_fcntl (int fd, int cmd, ...) attribute_hidden;
-#ifndef NO_CANCELLATION
-extern int __fcntl_nocancel (int fd, int cmd, ...) attribute_hidden;
 libc_hidden_proto (__libc_fcntl)
-#endif
 extern int __open (const char *__file, int __oflag, ...);
 libc_hidden_proto (__open)
 extern int __fcntl (int __fd, int __cmd, ...);
index bcf1455ae77086e282544ce45fc361357d4b8204..61ad422dcb86f349e15d37ec6d9136cdd4ce3e5d 100644 (file)
@@ -26,9 +26,6 @@ extern int __sigprocmask (int __how,
                          const sigset_t *__set, sigset_t *__oset);
 extern int __sigsuspend (const sigset_t *__set);
 libc_hidden_proto (__sigsuspend)
-#ifndef NO_CANCELLATION
-extern int __sigsuspend_nocancel (const sigset_t *__set) attribute_hidden;
-#endif
 extern int __sigwait (const sigset_t *__set, int *__sig);
 libc_hidden_proto (__sigwait)
 extern int __sigwaitinfo (const sigset_t *__set, siginfo_t *__info);
index 9956b82eb8828f0a40af8f7ecea4abaa8d1b28c8..73696082ccae3cbdac01586b14ce86a55ec98068 100644 (file)
@@ -79,9 +79,6 @@ extern struct tm *__tz_convert (const time_t *timer, int use_localtime, struct t
 extern int __nanosleep (const struct timespec *__requested_time,
                        struct timespec *__remaining);
 hidden_proto (__nanosleep)
-extern int __nanosleep_nocancel (const struct timespec *__requested_time,
-                                struct timespec *__remaining)
-  attribute_hidden;
 extern int __getdate_r (const char *__string, struct tm *__resbufp);
 
 
index d410b6c53305d79056df6030f4bd7c9778119afb..e0d27100abf3ec07240e75ebad618f6124d8b5ae 100644 (file)
@@ -29,6 +29,7 @@
 #include <not-cancel.h>
 #include <kernel-features.h>
 #include <sigsetops.h>
+#include <not-cancel.h>
 
 #include "utmp-private.h"
 #include "utmp-equal.h"
index 70ead5510a9c7f688772cfd944347e0bc402d284..e5a850c6fdeeaae1ce22f1a6d61e322cf5951e44 100644 (file)
@@ -42,5 +42,7 @@
   __pause ()
 #define __nanosleep_nocancel(requested_time, remaining) \
   __nanosleep (requested_time, remaining)
+#define __fcntl_nocancel(fd, cmd, ...) \
+  __fcntl (fd, cmd, __VA_ARGS__)
 
 #define NO_CANCELLATION 1
index f73b2bbe8ca5fde3d9886e252b35b744d127fae8..ae0b059e75366f5700345787e5c8091505d37a97 100644 (file)
@@ -85,4 +85,7 @@ libc_hidden_proto (__pause_nocancel)
 __typeof (__nanosleep) __nanosleep_nocancel;
 hidden_proto (__nanosleep_nocancel)
 
+/* Uncancelable fcntl.  */
+__typeof (__fcntl) __fcntl_nocancel attribute_hidden;
+
 #endif /* NOT_CANCEL_H  */