Просмотр исходного кода

[libc] fix 64bit issue for pthreads

Bernard Xiong 4 лет назад
Родитель
Сommit
fe2e9e924e
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      components/libc/pthreads/pthread.c
  2. 1 1
      include/rtdef.h

+ 1 - 1
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)

+ 1 - 1
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;