components/gcc47/patches/005-libitm-rwlock.patch
changeset 7012 cc470645fd82
parent 7011 10c58c99afd6
child 7013 9b20e919735b
equal deleted inserted replaced
7011:10c58c99afd6 7012:cc470645fd82
     1 # 2013-02-07  Stefan Teleman <[email protected]>
       
     2 # Not everything aligns on 4.
       
     3 #
       
     4 #       * Fix Solaris alignment. (st)
       
     5 #
       
     6 --- gcc-4.7.3/libitm/config/posix/rwlock.h	2011-12-23 17:42:35.000000000 -0800
       
     7 +++ gcc-4.7.3/libitm/config/posix/rwlock.h	2013-02-25 14:28:47.945337684 -0800
       
     8 @@ -47,10 +47,14 @@
       
     9  
       
    10  class gtm_rwlock
       
    11  {
       
    12 -  pthread_mutex_t mutex;	        // Held if manipulating any field.
       
    13 -  pthread_cond_t c_readers;	        // Readers wait here
       
    14 -  pthread_cond_t c_writers;	        // Writers wait here for writers
       
    15 -  pthread_cond_t c_confirmed_writers;	// Writers wait here for readers
       
    16 +  pthread_mutex_t mutex
       
    17 +      __attribute__((__aligned__(8)));	// Held if manipulating any field.
       
    18 +  pthread_cond_t c_readers
       
    19 +      __attribute__((__aligned__(8)));	// Readers wait here
       
    20 +  pthread_cond_t c_writers
       
    21 +      __attribute__((__aligned__(8)));	// Writers wait here for writers
       
    22 +  pthread_cond_t c_confirmed_writers
       
    23 +      __attribute__((__aligned__(8)));	// Writers wait here for readers
       
    24  
       
    25    static const unsigned a_writer  = 1;	// An active writer.
       
    26    static const unsigned w_writer  = 2;	// The w_writers field != 0