diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2014-06-19 15:22:52 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2014-06-19 15:24:33 -0700 |
commit | c8daec5c7cd19378112391d2394e6d6344e156dc (patch) | |
tree | d8da10024d3b93c5f59f29beaf2af92f48dfbf39 /sysdeps/x86 | |
parent | 5c74e47cd628a6fcd2e4eba021301e275f8a95a3 (diff) | |
download | glibc-c8daec5c7cd19378112391d2394e6d6344e156dc.tar.gz glibc-c8daec5c7cd19378112391d2394e6d6344e156dc.tar.xz glibc-c8daec5c7cd19378112391d2394e6d6344e156dc.zip |
Use 3 bytes for __pad1 in pthread_rwlock_t for x32
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.
Diffstat (limited to 'sysdeps/x86')
-rw-r--r-- | sysdeps/x86/nptl/bits/pthreadtypes.h | 7 |
1 files changed, 6 insertions, 1 deletions
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 |