components/gcc47/patches/005-libitm-rwlock.patch
author Petr Sumbera <petr.sumbera@oracle.com>
Tue, 03 Feb 2015 04:25:36 -0800
changeset 3737 a71f444ba849
parent 1414 9eeb516d9fdd
permissions -rw-r--r--
20462161 Upgrade Apache Web Server 2.4 to version 2.4.12 20462192 problem in UTILITY/APACHE

# 2013-02-07  Stefan Teleman <[email protected]>
# Not everything aligns on 4.
#
#       * Fix Solaris alignment. (st)
#
--- gcc-4.7.3/libitm/config/posix/rwlock.h	2011-12-23 17:42:35.000000000 -0800
+++ gcc-4.7.3/libitm/config/posix/rwlock.h	2013-02-25 14:28:47.945337684 -0800
@@ -47,10 +47,14 @@
 
 class gtm_rwlock
 {
-  pthread_mutex_t mutex;	        // Held if manipulating any field.
-  pthread_cond_t c_readers;	        // Readers wait here
-  pthread_cond_t c_writers;	        // Writers wait here for writers
-  pthread_cond_t c_confirmed_writers;	// Writers wait here for readers
+  pthread_mutex_t mutex
+      __attribute__((__aligned__(8)));	// Held if manipulating any field.
+  pthread_cond_t c_readers
+      __attribute__((__aligned__(8)));	// Readers wait here
+  pthread_cond_t c_writers
+      __attribute__((__aligned__(8)));	// Writers wait here for writers
+  pthread_cond_t c_confirmed_writers
+      __attribute__((__aligned__(8)));	// Writers wait here for readers
 
   static const unsigned a_writer  = 1;	// An active writer.
   static const unsigned w_writer  = 2;	// The w_writers field != 0