From da026e99e143d46010256e118b31e3f39896cd29 Mon Sep 17 00:00:00 2001 From: caifuzhou <504631861@qq.com> Date: Thu, 6 Jan 2022 15:38:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=9B=9E=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: caifuzhou <504631861@qq.com> --- porting/linux/user/include/pthread.h | 7 ------- porting/linux/user/src/internal/pthread_impl.h | 12 ++++++------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/porting/linux/user/include/pthread.h b/porting/linux/user/include/pthread.h index 73793e47..081df50c 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 df67a3d4..eee74797 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] -- GitLab