From fe2e9e924e8c08865254f26dd1c763ced4784b1d Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Sat, 6 Jun 2020 13:21:32 +0800 Subject: [PATCH] [libc] fix 64bit issue for pthreads --- components/libc/pthreads/pthread.c | 2 +- include/rtdef.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 components/libc/pthreads/pthread.c diff --git a/components/libc/pthreads/pthread.c b/components/libc/pthreads/pthread.c old mode 100755 new mode 100644 index 5d3bc0796a..19a511b45b --- a/components/libc/pthreads/pthread.c +++ b/components/libc/pthreads/pthread.c @@ -277,7 +277,7 @@ int pthread_create(pthread_t *pid, /* set pthread cleanup function and ptd data */ ptd->tid->cleanup = _pthread_cleanup; - ptd->tid->user_data = (rt_uint32_t)ptd; + ptd->tid->user_data = (rt_ubase_t)ptd; /* start thread */ if (rt_thread_startup(ptd->tid) == RT_EOK) diff --git a/include/rtdef.h b/include/rtdef.h index f2b546f75e..b391ff7685 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -623,7 +623,7 @@ struct rt_thread void *lwp; #endif - rt_uint32_t user_data; /**< private user data beyond this thread */ + rt_ubase_t user_data; /**< private user data beyond this thread */ }; typedef struct rt_thread *rt_thread_t;