olga / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-rh841653-6.patch

ce426f
commit 075b9322c9e091b7e139f4c57e07d78d896c7a62
ce426f
Author: Dominik Vogt <vogt@de.ibm.com>
ce426f
Date:   Fri Jul 19 05:16:28 2013 +0000
ce426f
ce426f
    Clean up whitespace in lock elision patches.
ce426f
    
ce426f
    Signed-off-by: Carlos O'Donell <carlos@redhat.com>
ce426f
Index: glibc-2.17-c758a686/nptl/pthread_mutex_lock.c
ce426f
===================================================================
ce426f
--- glibc-2.17-c758a686.orig/nptl/pthread_mutex_lock.c
ce426f
+++ glibc-2.17-c758a686/nptl/pthread_mutex_lock.c
ce426f
@@ -86,7 +86,7 @@ __pthread_mutex_lock (mutex)
ce426f
       /* This case can never happen on a system without elision,
ce426f
          as the mutex type initialization functions will not
ce426f
 	 allow to set the elision flags.  */
ce426f
-      /* Don't record owner or users for elision case. This is a
ce426f
+      /* Don't record owner or users for elision case.  This is a
ce426f
          tail call.  */
ce426f
       return LLL_MUTEX_LOCK_ELISION (mutex);
ce426f
     }
ce426f
Index: glibc-2.17-c758a686/nptl/pthread_mutex_trylock.c
ce426f
===================================================================
ce426f
--- glibc-2.17-c758a686.orig/nptl/pthread_mutex_trylock.c
ce426f
+++ glibc-2.17-c758a686/nptl/pthread_mutex_trylock.c
ce426f
@@ -31,7 +31,7 @@
ce426f
 #endif
ce426f
 
ce426f
 /* We don't force elision in trylock, because this can lead to inconsistent
ce426f
-   lock state if the lock was actually busy. */
ce426f
+   lock state if the lock was actually busy.  */
ce426f
 
ce426f
 int
ce426f
 __pthread_mutex_trylock (mutex)
ce426f
@@ -73,7 +73,7 @@ __pthread_mutex_trylock (mutex)
ce426f
       if (lll_trylock_elision (mutex->__data.__lock,
ce426f
 			       mutex->__data.__elision) != 0)
ce426f
         break;
ce426f
-      /* Don't record the ownership. */
ce426f
+      /* Don't record the ownership.  */
ce426f
       return 0;
ce426f
 
ce426f
     case PTHREAD_MUTEX_TIMED_NP:
ce426f
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h
ce426f
===================================================================
ce426f
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h
ce426f
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h
ce426f
@@ -112,7 +112,7 @@ typedef union
ce426f
     {
ce426f
       struct
ce426f
       {
ce426f
-        short __espins;
ce426f
+	short __espins;
ce426f
 	short __elision;
ce426f
 # define __spins d.__espins
ce426f
 # define __elision d.__elision
ce426f
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
ce426f
===================================================================
ce426f
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
ce426f
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
ce426f
@@ -14,7 +14,7 @@
ce426f
 
ce426f
    You should have received a copy of the GNU Lesser General Public
ce426f
    License along with the GNU C Library; if not, see
ce426f
-   <http://www.gnu.org/licenses/>. */
ce426f
+   <http://www.gnu.org/licenses/>.  */
ce426f
 
ce426f
 #include "config.h"
ce426f
 #include <pthreadP.h>
ce426f
@@ -32,7 +32,7 @@ struct elision_config __elision_aconf =
ce426f
        acquisition attempts.  */
ce426f
     .skip_lock_busy = 3,
ce426f
     /* How often to not attempt to use elision if a transaction aborted due
ce426f
-       to reasons other than other threads' memory accesses. Expressed in
ce426f
+       to reasons other than other threads' memory accesses.  Expressed in
ce426f
        number of lock acquisition attempts.  */
ce426f
     .skip_lock_internal_abort = 3,
ce426f
     /* How often we retry using elision if there is chance for the transaction
ce426f
@@ -52,13 +52,14 @@ int __rwlock_rtm_enabled attribute_hidde
ce426f
 
ce426f
 int __rwlock_rtm_read_retries attribute_hidden = 3;
ce426f
 
ce426f
-/* Set when the CPU supports elision. When false elision is never attempted.  */
ce426f
+/* Set when the CPU supports elision.  When false elision is never attempted.
ce426f
+ */
ce426f
 
ce426f
 int __elision_available attribute_hidden;
ce426f
 
ce426f
-/* Force elision for all new locks. This is used to decide whether existing
ce426f
+/* Force elision for all new locks.  This is used to decide whether existing
ce426f
    DEFAULT locks should be automatically upgraded to elision in
ce426f
-   pthread_mutex_lock(). Disabled for suid programs. Only used when elision
ce426f
+   pthread_mutex_lock().  Disabled for suid programs.  Only used when elision
ce426f
    is available.  */
ce426f
 
ce426f
 int __pthread_force_elision attribute_hidden;
ce426f
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.h
ce426f
===================================================================
ce426f
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.h
ce426f
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.h
ce426f
@@ -14,7 +14,7 @@
ce426f
 
ce426f
    You should have received a copy of the GNU Lesser General Public
ce426f
    License along with the GNU C Library; if not, see
ce426f
-   <http://www.gnu.org/licenses/>. */
ce426f
+   <http://www.gnu.org/licenses/>.  */
ce426f
 #ifndef _ELISION_CONF_H
ce426f
 #define _ELISION_CONF_H 1
ce426f
 
ce426f
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/elision-lock.c
ce426f
===================================================================
ce426f
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/x86/elision-lock.c
ce426f
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/elision-lock.c
ce426f
@@ -14,7 +14,7 @@
ce426f
 
ce426f
    You should have received a copy of the GNU Lesser General Public
ce426f
    License along with the GNU C Library; if not, see
ce426f
-   <http://www.gnu.org/licenses/>. */
ce426f
+   <http://www.gnu.org/licenses/>.  */
ce426f
 
ce426f
 #include <pthread.h>
ce426f
 #include "pthreadP.h"
ce426f
@@ -58,7 +58,7 @@ __lll_lock_elision (int *futex, short *a
ce426f
 	      if (*futex == 0)
ce426f
 		return 0;
ce426f
 
ce426f
-	      /* Lock was busy. Fall back to normal locking.
ce426f
+	      /* Lock was busy.  Fall back to normal locking.
ce426f
 		 Could also _xend here but xabort with 0xff code
ce426f
 		 is more visible in the profiler.  */
ce426f
 	      _xabort (_ABORT_LOCK_BUSY);
ce426f
@@ -69,12 +69,12 @@ __lll_lock_elision (int *futex, short *a
ce426f
 	      if ((status & _XABORT_EXPLICIT)
ce426f
 			&& _XABORT_CODE (status) == _ABORT_LOCK_BUSY)
ce426f
 	        {
ce426f
-		  /* Right now we skip here. Better would be to wait a bit
ce426f
-		     and retry. This likely needs some spinning.  */
ce426f
+		  /* Right now we skip here.  Better would be to wait a bit
ce426f
+		     and retry.  This likely needs some spinning.  */
ce426f
 		  if (*adapt_count != aconf.skip_lock_busy)
ce426f
 		    *adapt_count = aconf.skip_lock_busy;
ce426f
 		}
ce426f
-	      /* Internal abort. There is no chance for retry.
ce426f
+	      /* Internal abort.  There is no chance for retry.
ce426f
 		 Use the normal locking and next time use lock.
ce426f
 		 Be careful to avoid writing to the lock.  */
ce426f
 	      else if (*adapt_count != aconf.skip_lock_internal_abort)
ce426f
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/elision-timed.c
ce426f
===================================================================
ce426f
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/x86/elision-timed.c
ce426f
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/elision-timed.c
ce426f
@@ -14,7 +14,7 @@
ce426f
 
ce426f
    You should have received a copy of the GNU Lesser General Public
ce426f
    License along with the GNU C Library; if not, see
ce426f
-   <http://www.gnu.org/licenses/>. */
ce426f
+   <http://www.gnu.org/licenses/>.  */
ce426f
 
ce426f
 #include <time.h>
ce426f
 #include <elision-conf.h>
ce426f
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/elision-trylock.c
ce426f
===================================================================
ce426f
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/x86/elision-trylock.c
ce426f
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/elision-trylock.c
ce426f
@@ -14,7 +14,7 @@
ce426f
 
ce426f
    You should have received a copy of the GNU Lesser General Public
ce426f
    License along with the GNU C Library; if not, see
ce426f
-   <http://www.gnu.org/licenses/>. */
ce426f
+   <http://www.gnu.org/licenses/>.  */
ce426f
 
ce426f
 #include <pthread.h>
ce426f
 #include <pthreadP.h>
ce426f
@@ -24,14 +24,14 @@
ce426f
 
ce426f
 #define aconf __elision_aconf
ce426f
 
ce426f
-/* Try to elide a futex trylock. FUTEX is the futex variable. ADAPT_COUNT is the
ce426f
-   adaptation counter in the mutex.  */
ce426f
+/* Try to elide a futex trylock.  FUTEX is the futex variable.  ADAPT_COUNT is
ce426f
+   the adaptation counter in the mutex.  */
ce426f
 
ce426f
 int
ce426f
 __lll_trylock_elision (int *futex, short *adapt_count)
ce426f
 {
ce426f
   /* Implement POSIX semantics by forbiding nesting
ce426f
-     trylock. Sorry. After the abort the code is re-executed
ce426f
+     trylock.  Sorry.  After the abort the code is re-executed
ce426f
      non transactional and if the lock was already locked
ce426f
      return an error.  */
ce426f
   _xabort (_ABORT_NESTED_TRYLOCK);
ce426f
@@ -46,7 +46,7 @@ __lll_trylock_elision (int *futex, short
ce426f
 	  if (*futex == 0)
ce426f
 	    return 0;
ce426f
 
ce426f
-	  /* Lock was busy. Fall back to normal locking.
ce426f
+	  /* Lock was busy.  Fall back to normal locking.
ce426f
 	     Could also _xend here but xabort with 0xff code
ce426f
 	     is more visible in the profiler.  */
ce426f
 	  _xabort (_ABORT_LOCK_BUSY);
ce426f
@@ -54,12 +54,12 @@ __lll_trylock_elision (int *futex, short
ce426f
 
ce426f
       if (!(status & _XABORT_RETRY))
ce426f
         {
ce426f
-          /* Internal abort. No chance for retry. For future
ce426f
+          /* Internal abort.  No chance for retry.  For future
ce426f
              locks don't try speculation for some time.  */
ce426f
           if (*adapt_count != aconf.skip_trylock_internal_abort)
ce426f
             *adapt_count = aconf.skip_trylock_internal_abort;
ce426f
         }
ce426f
-      /* Could do some retries here. */
ce426f
+      /* Could do some retries here.  */
ce426f
     }
ce426f
   else
ce426f
     {
ce426f
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/force-elision.h
ce426f
===================================================================
ce426f
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/x86/force-elision.h
ce426f
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/force-elision.h
ce426f
@@ -14,7 +14,7 @@
ce426f
 
ce426f
    You should have received a copy of the GNU Lesser General Public
ce426f
    License along with the GNU C Library; if not, see
ce426f
-   <http://www.gnu.org/licenses/>. */
ce426f
+   <http://www.gnu.org/licenses/>.  */
ce426f
 
ce426f
 /* Check for elision on this lock without upgrading.  */
ce426f
 #define DO_ELISION(m)							\
ce426f
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/hle.h
ce426f
===================================================================
ce426f
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/x86/hle.h
ce426f
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/hle.h
ce426f
@@ -1,5 +1,5 @@
ce426f
-/* Shared RTM header. Emulate TSX intrinsics for compilers and assemblers
ce426f
-   that do not support the intrinsics and instructions yet. */
ce426f
+/* Shared RTM header.  Emulate TSX intrinsics for compilers and assemblers
ce426f
+   that do not support the intrinsics and instructions yet.  */
ce426f
 #ifndef _HLE_H
ce426f
 #define _HLE_H 1
ce426f
 
ce426f
@@ -28,7 +28,7 @@
ce426f
 /* Official RTM intrinsics interface matching gcc/icc, but works
ce426f
    on older gcc compatible compilers and binutils.
ce426f
    We should somehow detect if the compiler supports it, because
ce426f
-   it may be able to generate slightly better code. */
ce426f
+   it may be able to generate slightly better code.  */
ce426f
 
ce426f
 #define _XBEGIN_STARTED		(~0u)
ce426f
 #define _XABORT_EXPLICIT	(1 << 0)
ce426f
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c
ce426f
===================================================================
ce426f
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c
ce426f
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c
ce426f
@@ -13,9 +13,10 @@
ce426f
 
ce426f
    You should have received a copy of the GNU Lesser General Public
ce426f
    License along with the GNU C Library; if not, see
ce426f
-   <http://www.gnu.org/licenses/>. */
ce426f
+   <http://www.gnu.org/licenses/>.  */
ce426f
 
ce426f
 /* The cond lock is not actually elided yet, but we still need to handle
ce426f
    already elided locks.  */
ce426f
 #include <elision-conf.h>
ce426f
+
ce426f
 #include "sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c"
ce426f
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c
ce426f
===================================================================
ce426f
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c
ce426f
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c
ce426f
@@ -14,7 +14,8 @@
ce426f
 
ce426f
    You should have received a copy of the GNU Lesser General Public
ce426f
    License along with the GNU C Library; if not, see
ce426f
-   <http://www.gnu.org/licenses/>. */
ce426f
+   <http://www.gnu.org/licenses/>.  */
ce426f
+
ce426f
 #include <elision-conf.h>
ce426f
 #include "force-elision.h"
ce426f
 
ce426f
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c
ce426f
===================================================================
ce426f
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c
ce426f
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c
ce426f
@@ -14,7 +14,9 @@
ce426f
 
ce426f
    You should have received a copy of the GNU Lesser General Public
ce426f
    License along with the GNU C Library; if not, see
ce426f
-   <http://www.gnu.org/licenses/>. */
ce426f
+   <http://www.gnu.org/licenses/>.  */
ce426f
+
ce426f
 #include <elision-conf.h>
ce426f
 #include "force-elision.h"
ce426f
+
ce426f
 #include "nptl/pthread_mutex_timedlock.c"
ce426f
Index: glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c
ce426f
===================================================================
ce426f
--- glibc-2.17-c758a686.orig/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c
ce426f
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c
ce426f
@@ -14,7 +14,8 @@
ce426f
 
ce426f
    You should have received a copy of the GNU Lesser General Public
ce426f
    License along with the GNU C Library; if not, see
ce426f
-   <http://www.gnu.org/licenses/>. */
ce426f
+   <http://www.gnu.org/licenses/>.  */
ce426f
+
ce426f
 #include <elision-conf.h>
ce426f
 #include "force-elision.h"
ce426f