This is the mail archive of the glibc-cvs@sourceware.org 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]

GNU C Library master sources branch master updated. glibc-2.26-167-g988f991


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  988f991b5069f09d793c887618e84a196b100416 (commit)
       via  6f33fd046b8e8746e2abc19db2fdfd9c668750e9 (commit)
       via  08d6eb46caf13f46ce052d2be34522068c5a6d33 (commit)
      from  ee4e992ebe5f9712faedeefe8958b67d61eaa0f2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=988f991b5069f09d793c887618e84a196b100416

commit 988f991b5069f09d793c887618e84a196b100416
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Aug 22 10:09:52 2017 -0300

    Remove non cancellable sigsuspend definition
    
    There is no current internal usage for non cancellable sigsuspend calls.
    
    Checked on x86_64-linux-gnu, x86_64-linux-gnu-x32, and i686-linux-gnu.
    
    	* sysdeps/generic/not-cancel.h (sigsuspend_not_cancel): remove
    	macro.
    	* sysdeps/mach/hurd/sigsuspend.c (sigsuspend_not_cancel): remove
    	alias.
    	* sysdeps/unix/sysv/linux/not-cancel.h (sigsuspend_not_cancel):
    	likewise.

diff --git a/ChangeLog b/ChangeLog
index edac4d2..922cd87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2017-08-22  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* sysdeps/generic/not-cancel.h (sigsuspend_not_cancel): Remove
+	macro.
+	* sysdeps/mach/hurd/sigsuspend.c (sigsuspend_not_cancel): Remove
+	alias.
+	* sysdeps/unix/sysv/linux/not-cancel.h (sigsuspend_not_cancel):
+	Likewise.
+
 	* nptl/pthread_mutex_timedlock.c (__pthread_mutex_timedlock): Replace
 	nanosleep_not_cancel with __nanosleep_nocancel.
 	* sysdeps/generic/not-cancel.h (nanosleep_not_cancel): Remove macro.
diff --git a/sysdeps/generic/not-cancel.h b/sysdeps/generic/not-cancel.h
index e4a8584..70ead55 100644
--- a/sysdeps/generic/not-cancel.h
+++ b/sysdeps/generic/not-cancel.h
@@ -42,7 +42,5 @@
   __pause ()
 #define __nanosleep_nocancel(requested_time, remaining) \
   __nanosleep (requested_time, remaining)
-#define sigsuspend_not_cancel(set) \
-  __sigsuspend (set)
 
 #define NO_CANCELLATION 1
diff --git a/sysdeps/mach/hurd/sigsuspend.c b/sysdeps/mach/hurd/sigsuspend.c
index 4f5af1d..e60f2eb 100644
--- a/sysdeps/mach/hurd/sigsuspend.c
+++ b/sysdeps/mach/hurd/sigsuspend.c
@@ -79,5 +79,4 @@ __sigsuspend (const sigset_t *set)
   return -1;
 }
 libc_hidden_def (__sigsuspend)
-strong_alias (__sigsuspend, sigsuspend_not_cancel)
 weak_alias (__sigsuspend, sigsuspend)
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 577dca8..f73b2bb 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -85,8 +85,4 @@ libc_hidden_proto (__pause_nocancel)
 __typeof (__nanosleep) __nanosleep_nocancel;
 hidden_proto (__nanosleep_nocancel)
 
-/* Uncancelable sigsuspend.  */
-#define sigsuspend_not_cancel(set) \
-  INLINE_SYSCALL (rt_sigsuspend, 2, set, _NSIG / 8)
-
 #endif /* NOT_CANCEL_H  */

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f33fd046b8e8746e2abc19db2fdfd9c668750e9

commit 6f33fd046b8e8746e2abc19db2fdfd9c668750e9
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Jul 3 15:54:02 2017 -0300

    Consolidate non cancellable nanosleep call
    
    This patch consolidates all the non cancellable nanosleep calls to use
    the __nanosleep_nocancel identifier.  For non cancellable targets it will
    be just a macro to call the default respective symbol while on Linux
    will be a internal one.
    
    Checked on x86_64-linux-gnu, x86_64-linux-gnu-x32, and i686-linux-gnu.
    
    	* nptl/pthread_mutex_timedlock.c (__pthread_mutex_timedlock): Replace
    	nanosleep_not_cancel with __nanosleep_nocancel.
    	* sysdeps/generic/not-cancel.h (nanosleep_not_cancel): Remove macro.
    	(__nanosleep_nocancel): New macro.
    	* sysdeps/unix/sysv/linux/nanosleep.c (__nanosleep_nocancel): New
    	function.
    	* sysdeps/unix/sysv/linux/not-cancel.h (nanosleep_not_cancel): Remove
    	macro.
    	(__nanosleep_nocancel): New prototype.

diff --git a/ChangeLog b/ChangeLog
index 912921f..edac4d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2017-08-22  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* nptl/pthread_mutex_timedlock.c (__pthread_mutex_timedlock): Replace
+	nanosleep_not_cancel with __nanosleep_nocancel.
+	* sysdeps/generic/not-cancel.h (nanosleep_not_cancel): Remove macro.
+	(__nanosleep_nocancel): New macro.
+	* sysdeps/unix/sysv/linux/nanosleep.c (__nanosleep_nocancel): New
+	function.
+	* sysdeps/unix/sysv/linux/not-cancel.h (nanosleep_not_cancel): Remove
+	macro.
+	(__nanosleep_nocancel): New prototype.
+
 	* nptl/pthread_mutex_lock.c (__pthread_mutex_lock_full): Replace
 	pause_not_cancel with __pause_nocancel.
 	* sysdeps/generic/not-cancel.h (pause_not_cancel): Remove macro.
diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c
index d5ec314..45f3454 100644
--- a/nptl/pthread_mutex_timedlock.c
+++ b/nptl/pthread_mutex_timedlock.c
@@ -432,7 +432,7 @@ __pthread_mutex_timedlock (pthread_mutex_t *mutex,
 			--reltime.tv_sec;
 		      }
 		    if (reltime.tv_sec >= 0)
-		      while (nanosleep_not_cancel (&reltime, &reltime) != 0)
+		      while (__nanosleep_nocancel (&reltime, &reltime) != 0)
 			continue;
 
 		    return ETIMEDOUT;
diff --git a/sysdeps/generic/not-cancel.h b/sysdeps/generic/not-cancel.h
index f2140c2..e4a8584 100644
--- a/sysdeps/generic/not-cancel.h
+++ b/sysdeps/generic/not-cancel.h
@@ -40,7 +40,7 @@
   __waitpid (pid, stat_loc, options)
 #define __pause_nocancel() \
   __pause ()
-#define nanosleep_not_cancel(requested_time, remaining) \
+#define __nanosleep_nocancel(requested_time, remaining) \
   __nanosleep (requested_time, remaining)
 #define sigsuspend_not_cancel(set) \
   __sigsuspend (set)
diff --git a/sysdeps/unix/sysv/linux/nanosleep.c b/sysdeps/unix/sysv/linux/nanosleep.c
index 2d15328..e7ac2c0 100644
--- a/sysdeps/unix/sysv/linux/nanosleep.c
+++ b/sysdeps/unix/sysv/linux/nanosleep.c
@@ -18,6 +18,7 @@
 
 #include <time.h>
 #include <sysdep-cancel.h>
+#include <not-cancel.h>
 
 /* Pause execution for a number of nanoseconds.  */
 int
@@ -28,3 +29,11 @@ __nanosleep (const struct timespec *requested_time,
 }
 hidden_def (__nanosleep)
 weak_alias (__nanosleep, nanosleep)
+
+int
+__nanosleep_nocancel (const struct timespec *requested_time,
+		      struct timespec *remaining)
+{
+  return INLINE_SYSCALL_CALL (nanosleep, requested_time, remaining);
+}
+hidden_def (__nanosleep_nocancel)
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index ac78cb3..577dca8 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -26,6 +26,7 @@
 #include <unistd.h>
 #include <sys/syscall.h>
 #include <sys/wait.h>
+#include <time.h>
 
 /* Non cancellable open syscall.  */
 __typeof (open) __open_nocancel;
@@ -81,8 +82,8 @@ __typeof (pause) __pause_nocancel;
 libc_hidden_proto (__pause_nocancel)
 
 /* Uncancelable nanosleep.  */
-#define nanosleep_not_cancel(requested_time, remaining) \
-  INLINE_SYSCALL (nanosleep, 2, requested_time, remaining)
+__typeof (__nanosleep) __nanosleep_nocancel;
+hidden_proto (__nanosleep_nocancel)
 
 /* Uncancelable sigsuspend.  */
 #define sigsuspend_not_cancel(set) \

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=08d6eb46caf13f46ce052d2be34522068c5a6d33

commit 08d6eb46caf13f46ce052d2be34522068c5a6d33
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Aug 21 17:23:56 2017 -0300

    Consolidate non cancellable pause call
    
    This patch consolidates all the non cancellable pause calls to use
    the __pause_nocancel identifier.  For non cancellable targets it will
    be just a macro to call the default respective symbol while on Linux
    will be a internal one.
    
    Checked on x86_64-linux-gnu, x86_64-linux-gnu-x32, and i686-linux-gnu.
    
    	* nptl/pthread_mutex_lock.c (__pthread_mutex_lock_full): Replace
    	pause_not_cancel with __pause_nocancel.
    	* sysdeps/generic/not-cancel.h (pause_not_cancel): Remove macro.
    	(__pause_nocancel): New macro.
    	* sysdeps/unix/sysv/linux/not-cancel.h (pause_not_cancel): Remove
    	macro.
    	(__pause_nocancel): New prototype.
    	* sysdeps/unix/sysv/linux/pause.c (__pause_nocancel): New function.

diff --git a/ChangeLog b/ChangeLog
index 573bd51..912921f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-08-22  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+	* nptl/pthread_mutex_lock.c (__pthread_mutex_lock_full): Replace
+	pause_not_cancel with __pause_nocancel.
+	* sysdeps/generic/not-cancel.h (pause_not_cancel): Remove macro.
+	(__pause_nocancel): New macro.
+	* sysdeps/unix/sysv/linux/not-cancel.h (pause_not_cancel): Remove
+	macro.
+	(__pause_nocancel): New prototype.
+	* sysdeps/unix/sysv/linux/pause.c (__pause_nocancel): New function.
+
 2017-08-22  Martin Sebor  <msebor@redhat.com>
 
 	* include/libc-symbols.h (__ifunc_resolver): Declare resolver
diff --git a/include/unistd.h b/include/unistd.h
index 7f1c2cc..a5625ed 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -172,8 +172,6 @@ extern __pid_t __libc_fork (void);
 /* Suspend the process until a signal arrives.
    This always returns -1 and sets `errno' to EINTR.  */
 extern int __libc_pause (void);
-/* Not cancelable variant.  */
-extern int __pause_nocancel (void) attribute_hidden;
 
 extern int __getlogin_r_loginuid (char *name, size_t namesize)
      attribute_hidden;
diff --git a/nptl/pthread_mutex_lock.c b/nptl/pthread_mutex_lock.c
index 8c48503..b158607 100644
--- a/nptl/pthread_mutex_lock.c
+++ b/nptl/pthread_mutex_lock.c
@@ -428,7 +428,7 @@ __pthread_mutex_lock_full (pthread_mutex_t *mutex)
 
 		/* Delay the thread indefinitely.  */
 		while (1)
-		  pause_not_cancel ();
+		  __pause_nocancel ();
 	      }
 
 	    oldval = mutex->__data.__lock;
diff --git a/sysdeps/generic/not-cancel.h b/sysdeps/generic/not-cancel.h
index 3f924c8..f2140c2 100644
--- a/sysdeps/generic/not-cancel.h
+++ b/sysdeps/generic/not-cancel.h
@@ -38,7 +38,7 @@
   (void) __writev (fd, iov, n)
 # define __waitpid_nocancel(pid, stat_loc, options) \
   __waitpid (pid, stat_loc, options)
-#define pause_not_cancel() \
+#define __pause_nocancel() \
   __pause ()
 #define nanosleep_not_cancel(requested_time, remaining) \
   __nanosleep (requested_time, remaining)
diff --git a/sysdeps/posix/pause.c b/sysdeps/posix/pause.c
index 7996cd6..53e143d 100644
--- a/sysdeps/posix/pause.c
+++ b/sysdeps/posix/pause.c
@@ -39,18 +39,3 @@ __libc_pause (void)
 weak_alias (__libc_pause, pause)
 
 LIBC_CANCEL_HANDLED ();		/* sigsuspend handles our cancellation.  */
-
-#ifndef NO_CANCELLATION
-# include <not-cancel.h>
-
-int
-__pause_nocancel (void)
-{
-  sigset_t set;
-
-  __sigemptyset (&set);
-  __sigprocmask (SIG_BLOCK, NULL, &set);
-
-  return sigsuspend_not_cancel (&set);
-}
-#endif
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index c4a60b8..ac78cb3 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -77,14 +77,8 @@ __typeof (waitpid) __waitpid_nocancel;
 libc_hidden_proto (__waitpid_nocancel)
 
 /* Uncancelable pause.  */
-#define pause_not_cancel() \
-  ({ sigset_t set; 							     \
-     int __rc = INLINE_SYSCALL (rt_sigprocmask, 4, SIG_BLOCK, NULL, &set,    \
-				_NSIG / 8);				     \
-     if (__rc == 0)							     \
-       __rc = INLINE_SYSCALL (rt_sigsuspend, 2, &set, _NSIG / 8);	     \
-     __rc;								     \
-  })
+__typeof (pause) __pause_nocancel;
+libc_hidden_proto (__pause_nocancel)
 
 /* Uncancelable nanosleep.  */
 #define nanosleep_not_cancel(requested_time, remaining) \
diff --git a/sysdeps/unix/sysv/linux/pause.c b/sysdeps/unix/sysv/linux/pause.c
index 4ccce9e..3300eb8 100644
--- a/sysdeps/unix/sysv/linux/pause.c
+++ b/sysdeps/unix/sysv/linux/pause.c
@@ -19,10 +19,10 @@
 #include <signal.h>
 #include <unistd.h>
 #include <sysdep-cancel.h>
+#include <not-cancel.h>
 
 /* Suspend the process until a signal arrives.
    This always returns -1 and sets errno to EINTR.  */
-
 int
 __libc_pause (void)
 {
@@ -33,3 +33,14 @@ __libc_pause (void)
 #endif
 }
 weak_alias (__libc_pause, pause)
+
+int
+__pause_nocancel (void)
+{
+#ifdef __NR_pause
+  return INLINE_SYSCALL_CALL (pause);
+#else
+  return INLINE_SYSCALL_CALL (ppoll, NULL, 0, NULL, NULL);
+#endif
+}
+libc_hidden_def (__pause_nocancel)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                            |   28 ++++++++++++++++++++++++++++
 include/unistd.h                     |    2 --
 nptl/pthread_mutex_lock.c            |    2 +-
 nptl/pthread_mutex_timedlock.c       |    2 +-
 sysdeps/generic/not-cancel.h         |    6 ++----
 sysdeps/mach/hurd/sigsuspend.c       |    1 -
 sysdeps/posix/pause.c                |   15 ---------------
 sysdeps/unix/sysv/linux/nanosleep.c  |    9 +++++++++
 sysdeps/unix/sysv/linux/not-cancel.h |   19 +++++--------------
 sysdeps/unix/sysv/linux/pause.c      |   13 ++++++++++++-
 10 files changed, 58 insertions(+), 39 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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