components/gcc48/patches/005-libitm-rwlock.patch
author Drew Fisher <drew.fisher@oracle.com>
Fri, 16 Sep 2016 07:20:38 -0700
changeset 6917 6936cd289acf
parent 1561 3b427cd1199e
permissions -rw-r--r--
24674278 swift puppet module still defines a File dependency with no file entries

# 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