]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Clean up whitespace in lock elision patches.
authorDominik Vogt <vogt@de.ibm.com>
Fri, 19 Jul 2013 05:16:28 +0000 (05:16 +0000)
committerCarlos O'Donell <carlos@redhat.com>
Fri, 19 Jul 2013 06:35:04 +0000 (02:35 -0400)
Signed-off-by: Carlos O'Donell <carlos@redhat.com>
15 files changed:
nptl/ChangeLog
nptl/pthread_mutex_lock.c
nptl/pthread_mutex_trylock.c
nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h
nptl/sysdeps/unix/sysv/linux/x86/elision-conf.c
nptl/sysdeps/unix/sysv/linux/x86/elision-conf.h
nptl/sysdeps/unix/sysv/linux/x86/elision-lock.c
nptl/sysdeps/unix/sysv/linux/x86/elision-timed.c
nptl/sysdeps/unix/sysv/linux/x86/elision-trylock.c
nptl/sysdeps/unix/sysv/linux/x86/force-elision.h
nptl/sysdeps/unix/sysv/linux/x86/hle.h
nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c
nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c
nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c
nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c

index 8aeee8f32ec6a62b0bd0543d27a6982906c8c4b6..fc2ef41a94c2cd466522845d47d17ba374125081 100644 (file)
@@ -1,5 +1,20 @@
 2013-07-19  Dominik Vogt  <vogt@de.ibm.com>
 
+       * pthread_mutex_lock.c: Fix whitespace.
+       * pthread_mutex_trylock.c: Likewise.
+       * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
+       * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise.
+       * sysdeps/unix/sysv/linux/x86/elision-conf.h: Likewise.
+       * sysdeps/unix/sysv/linux/x86/elision-lock.c: Likewise.
+       * sysdeps/unix/sysv/linux/x86/elision-timed.c: Likewise.
+       * sysdeps/unix/sysv/linux/x86/elision-trylock.c: Likewise.
+       * sysdeps/unix/sysv/linux/x86/force-elision.h: Likewise.
+       * sysdeps/unix/sysv/linux/x86/hle.h: Likewise.
+       * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
+       * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
+       * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
+       * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
+
        * sysdeps/unix/sysv/linux/x86/elision-conf.c:
        Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries.
        (elision_init): Don't set __rwlock_rtm_enabled.
index b37f39a0a9ffc74eabb3db38679f2b32c203bb82..76dd903142b773a7cac2ef7edf6dcca50ee89f7f 100644 (file)
@@ -86,7 +86,7 @@ __pthread_mutex_lock (mutex)
       /* This case can never happen on a system without elision,
          as the mutex type initialization functions will not
         allow to set the elision flags.  */
-      /* Don't record owner or users for elision case. This is a
+      /* Don't record owner or users for elision case.  This is a
          tail call.  */
       return LLL_MUTEX_LOCK_ELISION (mutex);
     }
index 600c8483b0a4e8cb72d0baebfc61cac61e4ee329..24fb05286f196c1836f03930f55ac233e1f5c029 100644 (file)
@@ -31,7 +31,7 @@
 #endif
 
 /* We don't force elision in trylock, because this can lead to inconsistent
-   lock state if the lock was actually busy. */
+   lock state if the lock was actually busy.  */
 
 int
 __pthread_mutex_trylock (mutex)
@@ -73,7 +73,7 @@ __pthread_mutex_trylock (mutex)
       if (lll_trylock_elision (mutex->__data.__lock,
                               mutex->__data.__elision) != 0)
         break;
-      /* Don't record the ownership. */
+      /* Don't record the ownership.  */
       return 0;
 
     case PTHREAD_MUTEX_TIMED_NP:
index 1852e07842313d95d1aafbfc01f62f3bf7d52e26..28b49bd893179806737c6a603ce0aec05ea603d2 100644 (file)
@@ -112,7 +112,7 @@ typedef union
     {
       struct
       {
-        short __espins;
+       short __espins;
        short __elision;
 # define __spins d.__espins
 # define __elision d.__elision
index 822d4bd1b65408ba9c04f669add8bac59139ceb6..2fed32b9a9e942187a1e9bc392b14c580894b592 100644 (file)
@@ -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;
index 6fa26973dc88595a2ce3a5ef46c317d25c4a661f..02cd2a625c0b335e88adcf8862940ca250f741c9 100644 (file)
@@ -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
 
index de16f1b02fd282228a8ad0c61c3a7f1db0faac72..9d009839b8383bfa9a048aec693900d71793b3b6 100644 (file)
@@ -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)
index 8825d1287e5f72e2a950a8c4c33d817868538b18..1532964720675d464a664d28fe6e20c481bac044 100644 (file)
@@ -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>
index 689a6fbe2aa5a21745af1e930f5f7897b1816a02..f6c47ef42e8a8e36ca65fa4f8e9f4346f1f6c238 100644 (file)
@@ -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>
 
 #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
     {
index 703e930be18212df10f1fad4184171aa1cb2478e..9789905608b2aa452856eed83b1ac723df7006ee 100644 (file)
@@ -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)                                                  \
index a08f0fa7112f5d3ab7f5c8f1f2f48a7759520f45..4a7b9e3bf7e9e93e06692d6937236f1cbec3c22f 100644 (file)
@@ -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)
index 962f10107371b0f8fda79e2bf6af7d1d81628880..fe64e022d91d19dc7f35c2446954dea04a630169 100644 (file)
 
    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"
index e639460530b5771a2c05076b0078469f548b4594..37b122f47e17c9a258f80c209a56e1e6b0e9ca00 100644 (file)
@@ -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"
 
index 5115d0304aa789990ff6977fd8746ede9eb19047..ddc6d929b31caa9b5e5665d2e490c0df631e3b0c 100644 (file)
@@ -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"
index 9bb4a659d4cba2561c1dc37b4bfa4b06c950d586..0148acaea559d90810289df7a943fc2ca16835a7 100644 (file)
@@ -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"