Browse Source

reorder mutex struct fields to make room for pointers (upcoming robust mutexes)

the layout has been chosen so that pointer slots 3 and 4 fit between
the integer slots on 32-bit archs, and come after the integer slots on
64-bit archs.
Rich Felker 14 years ago
parent
commit
93cc986ab3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/internal/pthread_impl.h

+ 3 - 1
src/internal/pthread_impl.h

@@ -47,7 +47,9 @@ struct pthread {
 #define _m_type __u.__i[0]
 #define _m_lock __u.__i[1]
 #define _m_waiters __u.__i[2]
-#define _m_count __u.__i[4]
+#define _m_prev __u.__p[3]
+#define _m_next __u.__p[4]
+#define _m_count __u.__i[5]
 #define _c_block __u.__i[0]
 #define _c_clock __u.__i[1]
 #define _rw_wrlock __u.__i[0]