From: Rich Felker Date: Thu, 17 Mar 2011 17:17:15 +0000 (-0400) Subject: reorder mutex struct fields to make room for pointers (upcoming robust mutexes) X-Git-Tag: v0.7.1~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93cc986ab37b14f8c6b624439ce2a2beca7b3cf7;p=musl 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. --- diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h index 102413f5..9d56e8fa 100644 --- a/src/internal/pthread_impl.h +++ b/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]