diff --git a/porting/linux/user/include/pthread.h b/porting/linux/user/include/pthread.h index 73793e47ef537abeaf7dcef842ea9e396493bfca..081df50c297b211a9d0ed68d002de56a87769d9f 100644 --- a/porting/linux/user/include/pthread.h +++ b/porting/linux/user/include/pthread.h @@ -10,19 +10,12 @@ extern "C" { * so users can not access the mutex-ower-ID. * Thus we added this macro for getting the owner-ID * of the mutex. */ -#define MUTEX_OWNER __u.__vi[1] & 0x7fffffff /* These macros provides macros for accessing inner * attributes of the pthread_mutex_t struct. * It is intended for solving the coompiling failure * of Dopra codes which claims that .__data.* realm * can not be found in pthread_mutex_t. */ -#define MUTEX_TYPE __u.__i[0] -#define MUTEX_LOCK __u.__vi[1] -#define MUTEX_WAITERS __u.__vi[2] -#define MUTEX_PREV __u.__p[3] -#define MUTEX_NEXT __u.__p[4] -#define MUTEX_COUNT __u.__i[5] #define __NEED_time_t #define __NEED_clockid_t diff --git a/porting/linux/user/src/internal/pthread_impl.h b/porting/linux/user/src/internal/pthread_impl.h index df67a3d4f6a42e126f6b28c8264b5d7f4431264d..eee747976a4e71ceb76448f93ae5a7f823edb9d1 100644 --- a/porting/linux/user/src/internal/pthread_impl.h +++ b/porting/linux/user/src/internal/pthread_impl.h @@ -84,12 +84,12 @@ struct __timer { * the open source society has made to these original macros, * because patching will fail if the value of the _m_* are * changed by musl society */ -#define _m_type MUTEX_TYPE -#define _m_lock MUTEX_LOCK -#define _m_waiters MUTEX_WAITERS -#define _m_prev MUTEX_PREV -#define _m_next MUTEX_NEXT -#define _m_count MUTEX_COUNT +#define _m_type __u.__i[0] +#define _m_lock __u.__vi[1] +#define _m_waiters __u.__vi[2] +#define _m_prev __u.__p[3] +#define _m_next __u.__p[4] +#define _m_count __u.__i[5] #define _c_shared __u.__p[0] #define _c_seq __u.__vi[2]