components/gcc47/patches/005-libitm-rwlock.patch
author Rich Burridge <rich.burridge@oracle.com>
Fri, 19 Jun 2015 18:44:29 -0700
branchs11-update
changeset 4514 d5eea6257d67
parent 2720 ce63a14b34c3
permissions -rw-r--r--
15477360 SUNBT6696488 rpm2cpio needs updating to cope with rpms from the modern era

# 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