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