about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/x86/nptl/bits/pthreadtypes.h7
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 841d55e340..ec08f77bf1 100644
--- 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>
 
diff --git a/sysdeps/x86/nptl/bits/pthreadtypes.h b/sysdeps/x86/nptl/bits/pthreadtypes.h
index b04c32b11f..7f8076b89a 100644
--- a/sysdeps/x86/nptl/bits/pthreadtypes.h
+++ b/sysdeps/x86/nptl/bits/pthreadtypes.h
@@ -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