Explorar o código

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 %!s(int64=14) %!d(string=hai) anos
pai
achega
93cc986ab3
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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]