about summary refs log tree commit diff
path: root/nptl/sysdeps/unix
diff options
context:
space:
mode:
authorDominik Vogt <vogt@de.ibm.com>2013-07-19 05:16:28 +0000
committerCarlos O'Donell <carlos@redhat.com>2013-07-19 02:35:04 -0400
commit075b9322c9e091b7e139f4c57e07d78d896c7a62 (patch)
treeed59e1f76c65070543cce6558eb562752b0b31c9 /nptl/sysdeps/unix
parentd3d3ce982a61f4a657589f7fa0a979e9e907580d (diff)
downloadglibc-075b9322c9e091b7e139f4c57e07d78d896c7a62.tar.gz
glibc-075b9322c9e091b7e139f4c57e07d78d896c7a62.tar.xz
glibc-075b9322c9e091b7e139f4c57e07d78d896c7a62.zip
Clean up whitespace in lock elision patches.
Signed-off-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'nptl/sysdeps/unix')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86/elision-conf.h2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86/elision-lock.c10
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86/elision-timed.c2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86/elision-trylock.c14
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86/force-elision.h2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86/hle.h6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c3
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c3
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c3
12 files changed, 34 insertions, 28 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h
index 1852e07842..28b49bd893 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h
@@ -112,7 +112,7 @@ typedef union
     {
       struct
       {
-        short __espins;
+	short __espins;
 	short __elision;
 # define __spins d.__espins
 # define __elision d.__elision
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c b/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
index 822d4bd1b6..2fed32b9a9 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
+++ b/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
@@ -14,7 +14,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>. */
+   <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include <pthreadP.h>
@@ -32,7 +32,7 @@ struct elision_config __elision_aconf =
        acquisition attempts.  */
     .skip_lock_busy = 3,
     /* How often to not attempt to use elision if a transaction aborted due
-       to reasons other than other threads' memory accesses. Expressed in
+       to reasons other than other threads' memory accesses.  Expressed in
        number of lock acquisition attempts.  */
     .skip_lock_internal_abort = 3,
     /* How often we retry using elision if there is chance for the transaction
@@ -43,13 +43,14 @@ struct elision_config __elision_aconf =
     .skip_trylock_internal_abort = 3,
   };
 
-/* Set when the CPU supports elision. When false elision is never attempted.  */
+/* Set when the CPU supports elision.  When false elision is never attempted.
+ */
 
 int __elision_available attribute_hidden;
 
-/* Force elision for all new locks. This is used to decide whether existing
+/* Force elision for all new locks.  This is used to decide whether existing
    DEFAULT locks should be automatically upgraded to elision in
-   pthread_mutex_lock(). Disabled for suid programs. Only used when elision
+   pthread_mutex_lock().  Disabled for suid programs.  Only used when elision
    is available.  */
 
 int __pthread_force_elision attribute_hidden;
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.h b/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.h
index 6fa26973dc..02cd2a625c 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86/elision-conf.h
@@ -14,7 +14,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>. */
+   <http://www.gnu.org/licenses/>.  */
 #ifndef _ELISION_CONF_H
 #define _ELISION_CONF_H 1
 
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/elision-lock.c b/nptl/sysdeps/unix/sysv/linux/x86/elision-lock.c
index de16f1b02f..9d009839b8 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86/elision-lock.c
+++ b/nptl/sysdeps/unix/sysv/linux/x86/elision-lock.c
@@ -14,7 +14,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>. */
+   <http://www.gnu.org/licenses/>.  */
 
 #include <pthread.h>
 #include "pthreadP.h"
@@ -58,7 +58,7 @@ __lll_lock_elision (int *futex, short *adapt_count, EXTRAARG int private)
 	      if (*futex == 0)
 		return 0;
 
-	      /* Lock was busy. Fall back to normal locking.
+	      /* Lock was busy.  Fall back to normal locking.
 		 Could also _xend here but xabort with 0xff code
 		 is more visible in the profiler.  */
 	      _xabort (_ABORT_LOCK_BUSY);
@@ -69,12 +69,12 @@ __lll_lock_elision (int *futex, short *adapt_count, EXTRAARG int private)
 	      if ((status & _XABORT_EXPLICIT)
 			&& _XABORT_CODE (status) == _ABORT_LOCK_BUSY)
 	        {
-		  /* Right now we skip here. Better would be to wait a bit
-		     and retry. This likely needs some spinning.  */
+		  /* Right now we skip here.  Better would be to wait a bit
+		     and retry.  This likely needs some spinning.  */
 		  if (*adapt_count != aconf.skip_lock_busy)
 		    *adapt_count = aconf.skip_lock_busy;
 		}
-	      /* Internal abort. There is no chance for retry.
+	      /* Internal abort.  There is no chance for retry.
 		 Use the normal locking and next time use lock.
 		 Be careful to avoid writing to the lock.  */
 	      else if (*adapt_count != aconf.skip_lock_internal_abort)
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/elision-timed.c b/nptl/sysdeps/unix/sysv/linux/x86/elision-timed.c
index 8825d1287e..1532964720 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86/elision-timed.c
+++ b/nptl/sysdeps/unix/sysv/linux/x86/elision-timed.c
@@ -14,7 +14,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>. */
+   <http://www.gnu.org/licenses/>.  */
 
 #include <time.h>
 #include <elision-conf.h>
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/elision-trylock.c b/nptl/sysdeps/unix/sysv/linux/x86/elision-trylock.c
index 689a6fbe2a..f6c47ef42e 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86/elision-trylock.c
+++ b/nptl/sysdeps/unix/sysv/linux/x86/elision-trylock.c
@@ -14,7 +14,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>. */
+   <http://www.gnu.org/licenses/>.  */
 
 #include <pthread.h>
 #include <pthreadP.h>
@@ -24,14 +24,14 @@
 
 #define aconf __elision_aconf
 
-/* Try to elide a futex trylock. FUTEX is the futex variable. ADAPT_COUNT is the
-   adaptation counter in the mutex.  */
+/* Try to elide a futex trylock.  FUTEX is the futex variable.  ADAPT_COUNT is
+   the adaptation counter in the mutex.  */
 
 int
 __lll_trylock_elision (int *futex, short *adapt_count)
 {
   /* Implement POSIX semantics by forbiding nesting
-     trylock. Sorry. After the abort the code is re-executed
+     trylock.  Sorry.  After the abort the code is re-executed
      non transactional and if the lock was already locked
      return an error.  */
   _xabort (_ABORT_NESTED_TRYLOCK);
@@ -46,7 +46,7 @@ __lll_trylock_elision (int *futex, short *adapt_count)
 	  if (*futex == 0)
 	    return 0;
 
-	  /* Lock was busy. Fall back to normal locking.
+	  /* Lock was busy.  Fall back to normal locking.
 	     Could also _xend here but xabort with 0xff code
 	     is more visible in the profiler.  */
 	  _xabort (_ABORT_LOCK_BUSY);
@@ -54,12 +54,12 @@ __lll_trylock_elision (int *futex, short *adapt_count)
 
       if (!(status & _XABORT_RETRY))
         {
-          /* Internal abort. No chance for retry. For future
+          /* Internal abort.  No chance for retry.  For future
              locks don't try speculation for some time.  */
           if (*adapt_count != aconf.skip_trylock_internal_abort)
             *adapt_count = aconf.skip_trylock_internal_abort;
         }
-      /* Could do some retries here. */
+      /* Could do some retries here.  */
     }
   else
     {
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/force-elision.h b/nptl/sysdeps/unix/sysv/linux/x86/force-elision.h
index 703e930be1..9789905608 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86/force-elision.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86/force-elision.h
@@ -14,7 +14,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>. */
+   <http://www.gnu.org/licenses/>.  */
 
 /* Check for elision on this lock without upgrading.  */
 #define DO_ELISION(m)							\
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/hle.h b/nptl/sysdeps/unix/sysv/linux/x86/hle.h
index a08f0fa711..4a7b9e3bf7 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86/hle.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86/hle.h
@@ -1,5 +1,5 @@
-/* Shared RTM header. Emulate TSX intrinsics for compilers and assemblers
-   that do not support the intrinsics and instructions yet. */
+/* Shared RTM header.  Emulate TSX intrinsics for compilers and assemblers
+   that do not support the intrinsics and instructions yet.  */
 #ifndef _HLE_H
 #define _HLE_H 1
 
@@ -28,7 +28,7 @@
 /* Official RTM intrinsics interface matching gcc/icc, but works
    on older gcc compatible compilers and binutils.
    We should somehow detect if the compiler supports it, because
-   it may be able to generate slightly better code. */
+   it may be able to generate slightly better code.  */
 
 #define _XBEGIN_STARTED		(~0u)
 #define _XABORT_EXPLICIT	(1 << 0)
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c b/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c
index 962f101073..fe64e022d9 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c
+++ b/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c
@@ -13,9 +13,10 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>. */
+   <http://www.gnu.org/licenses/>.  */
 
 /* The cond lock is not actually elided yet, but we still need to handle
    already elided locks.  */
 #include <elision-conf.h>
+
 #include "sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c"
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c b/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c
index e639460530..37b122f47e 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c
+++ b/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c
@@ -14,7 +14,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>. */
+   <http://www.gnu.org/licenses/>.  */
+
 #include <elision-conf.h>
 #include "force-elision.h"
 
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c b/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c
index 5115d0304a..ddc6d929b3 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c
+++ b/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c
@@ -14,7 +14,9 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>. */
+   <http://www.gnu.org/licenses/>.  */
+
 #include <elision-conf.h>
 #include "force-elision.h"
+
 #include "nptl/pthread_mutex_timedlock.c"
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c b/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c
index 9bb4a659d4..0148acaea5 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c
+++ b/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c
@@ -14,7 +14,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>. */
+   <http://www.gnu.org/licenses/>.  */
+
 #include <elision-conf.h>
 #include "force-elision.h"