]> sourceware.org Git - glibc.git/commitdiff
Use 3 bytes for __pad1 in pthread_rwlock_t for x32
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 19 Jun 2014 22:22:52 +0000 (15:22 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 19 Jun 2014 22:24:33 +0000 (15:24 -0700)
Since long is 4 bytes for x32, we should use 3 bytes for __pad1 when
a long __pad1 is replaced by a byte __rwelision and __pad1.

* sysdeps/x86/nptl/bits/pthreadtypes.h (pthread_rwlock_t): Use
3 bytes for __pad1 for x32.
(__PTHREAD_RWLOCK_ELISION_EXTRA): Likewise.

ChangeLog
sysdeps/x86/nptl/bits/pthreadtypes.h

index 841d55e3408a59b10fc78e2f2d38c2f4a4746ef0..ec08f77bf1a72679dd1ab8b3e37f7e6f3ab1eb14 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-06-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * sysdeps/x86/nptl/bits/pthreadtypes.h (pthread_rwlock_t): Use
+       3 bytes for __pad1 for x32.
+       (__PTHREAD_RWLOCK_ELISION_EXTRA): Likewise.
+
 2014-06-19  Ling Ma  <ling.ml@alibaba-inc.com>
            H.J. Lu  <hongjiu.lu@intel.com>
 
index b04c32b11f9cad6b0bd44b3c8517ccc2be580359..7f8076b89a176929d7f68f865ff462c85eba2039 100644 (file)
@@ -185,12 +185,17 @@ typedef union
     int __writer;
     int __shared;
     signed char __rwelision;
+#  ifdef  __ILP32__
+    unsigned char __pad1[3];
+#    define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 }
+#  else
     unsigned char __pad1[7];
+#    define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
+#  endif
     unsigned long int __pad2;
     /* FLAGS must stay at this position in the structure to maintain
        binary compatibility.  */
     unsigned int __flags;
-# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, {0, 0, 0, 0, 0, 0, 0 }
 # define __PTHREAD_RWLOCK_INT_FLAGS_SHARED     1
   } __data;
 # else
This page took 0.116564 seconds and 5 git commands to generate.