summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2020-06-06 13:21:32 +0800
committerBernard Xiong <[email protected]>2020-06-06 13:21:32 +0800
commitfe2e9e924e8c08865254f26dd1c763ced4784b1d (patch)
tree265dd2fb7f7cb104b4828e1df7e34851f4725489
parenta4f1905b6d7543a0c0cf81fc1d91cc46d52a5bd1 (diff)
[libc] fix 64bit issue for pthreads
-rw-r--r--[-rwxr-xr-x]components/libc/pthreads/pthread.c2
-rw-r--r--include/rtdef.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/components/libc/pthreads/pthread.c b/components/libc/pthreads/pthread.c
index 5d3bc0796a..19a511b45b 100755..100644
--- 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;