This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[COMMITTED] Consolidate remaning non cancellable definitions

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

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

	* 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
 ChangeLog                            | 10 ++++++++++
 include/fcntl.h                      |  3 ---
 include/signal.h                     |  3 ---
 include/time.h                       |  3 ---
 login/utmp_file.c                    |  1 +
 sysdeps/generic/not-cancel.h         |  2 ++
 sysdeps/unix/sysv/linux/not-cancel.h |  3 +++
 7 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/include/fcntl.h b/include/fcntl.h
index 9a007c3..3d68c5e 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -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;
-extern int __fcntl_nocancel (int fd, int cmd, ...) attribute_hidden;
 libc_hidden_proto (__libc_fcntl)
 extern int __open (const char *__file, int __oflag, ...);
 libc_hidden_proto (__open)
 extern int __fcntl (int __fd, int __cmd, ...);
diff --git a/include/signal.h b/include/signal.h
index bcf1455..61ad422 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -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)
-extern int __sigsuspend_nocancel (const sigset_t *__set) attribute_hidden;
 extern int __sigwait (const sigset_t *__set, int *__sig);
 libc_hidden_proto (__sigwait)
 extern int __sigwaitinfo (const sigset_t *__set, siginfo_t *__info);
diff --git a/include/time.h b/include/time.h
index 9956b82..7369608 100644
--- a/include/time.h
+++ b/include/time.h
@@ -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);
diff --git a/login/utmp_file.c b/login/utmp_file.c
index d410b6c..e0d2710 100644
--- a/login/utmp_file.c
+++ b/login/utmp_file.c
@@ -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"
diff --git a/sysdeps/generic/not-cancel.h b/sysdeps/generic/not-cancel.h
index 70ead55..e5a850c 100644
--- a/sysdeps/generic/not-cancel.h
+++ b/sysdeps/generic/not-cancel.h
@@ -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__)
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index f73b2bb..ae0b059 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -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  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]