aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@systemhalted.org>2009-11-25 18:18:56 -0500
committerCarlos O'Donell <carlos@systemhalted.org>2009-11-25 18:18:56 -0500
commitb80ec5369182532a06bf4972ff274bc152d5eda6 (patch)
tree3b746ff1a7137c19f7d5cf2c85e355dccce2cc9d
parent8fe357d5c6517be5718be681cf8ff89a191a8e9b (diff)
downloadglibc-b80ec5369182532a06bf4972ff274bc152d5eda6.tar.xz
glibc-b80ec5369182532a06bf4972ff274bc152d5eda6.zip
Add correct aligment to pthread_*_t structures.
In the switch to NPTL the pthrad_mutex_t, pthread_cond_t, and pthread_rwlock_t structures were made binary compatible with the Linuxthread versions. However, their aligment when embedded in other structures was changed. When rebuilding libstdc++ this was detected, and the following changes return the structures to their original Linuxthreads alignments. 2009-11-25 Carlos O'Donell <carlos@codesourcery.com> * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h: Use correct alignment for pthread_mutex_t, pthread_cond_t, and pthread_rwlock_t.
-rw-r--r--ChangeLog.hppa6
-rw-r--r--sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h6
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index ac6acba45a..24a152e139 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,9 @@
+2009-11-25 Carlos O'Donell <carlos@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h:
+ Use correct alignment for pthread_mutex_t, pthread_cond_t,
+ and pthread_rwlock_t.
+
2009-11-22 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Avoid warnings
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
index 87c1a55215..952e53c933 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
@@ -64,7 +64,7 @@ typedef union
{
struct __pthread_mutex_s
{
- int __lock;
+ int __lock __attribute__ ((aligned(16)));
unsigned int __count;
int __owner;
/* KIND must stay at this position in the structure to maintain
@@ -113,7 +113,7 @@ typedef union
start of the 4-word lock structure, the next four words
are set all to 1 by the Linuxthreads
PTHREAD_COND_INITIALIZER. */
- int __lock;
+ int __lock __attribute__ ((aligned(16)));
/* Tracks the initialization of this structure:
0 initialized with NPTL PTHREAD_COND_INITIALIZER.
1 initialized with Linuxthreads PTHREAD_COND_INITIALIZER.
@@ -161,7 +161,7 @@ typedef union
start of the 4-word 16-byte aligned lock structure. The
next four words are all set to 1 by the Linuxthreads
PTHREAD_RWLOCK_INITIALIZER. We ignore them in NPTL. */
- int __compat_padding[4];
+ int __compat_padding[4] __attribute__ ((aligned(16)));
int __lock;
unsigned int __nr_readers;
unsigned int __readers_wakeup;