@@ -135,8 +135,8 @@ void _pthread_data_destroy(_pthread_data_t *ptd)
135135 /* clean magic */
136136 ptd -> magic = 0x0 ;
137137
138- /* clear the "ptd->tid->user_data " */
139- ptd -> tid -> user_data = RT_NULL ;
138+ /* clear the "ptd->tid->pthread_data " */
139+ ptd -> tid -> pthread_data = RT_NULL ;
140140
141141 /* free ptd */
142142 rt_free (ptd );
@@ -281,7 +281,7 @@ int pthread_create(pthread_t *pid,
281281
282282 /* set pthread cleanup function and ptd data */
283283 ptd -> tid -> cleanup = _pthread_cleanup ;
284- ptd -> tid -> user_data = (rt_ubase_t )ptd ;
284+ ptd -> tid -> pthread_data = (void * )ptd ;
285285
286286 /* start thread */
287287 if (rt_thread_startup (ptd -> tid ) == RT_EOK )
@@ -394,8 +394,8 @@ pthread_t pthread_self (void)
394394 tid = rt_thread_self ();
395395 if (tid == NULL ) return PTHREAD_NUM_MAX ;
396396
397- /* get pthread data from user data of thread */
398- ptd = (_pthread_data_t * )rt_thread_self ()-> user_data ;
397+ /* get pthread data from pthread_data of thread */
398+ ptd = (_pthread_data_t * )rt_thread_self ()-> pthread_data ;
399399 RT_ASSERT (ptd != RT_NULL );
400400
401401 return _pthread_data_get_pth (ptd );
@@ -477,8 +477,8 @@ void pthread_exit(void *value)
477477 return ;
478478 }
479479
480- /* get pthread data from user data of thread */
481- ptd = (_pthread_data_t * )rt_thread_self ()-> user_data ;
480+ /* get pthread data from pthread_data of thread */
481+ ptd = (_pthread_data_t * )rt_thread_self ()-> pthread_data ;
482482
483483 rt_enter_critical ();
484484 /* disable cancel */
@@ -595,8 +595,8 @@ void pthread_cleanup_pop(int execute)
595595
596596 if (rt_thread_self () == NULL ) return ;
597597
598- /* get pthread data from user data of thread */
599- ptd = (_pthread_data_t * )rt_thread_self ()-> user_data ;
598+ /* get pthread data from pthread_data of thread */
599+ ptd = (_pthread_data_t * )rt_thread_self ()-> pthread_data ;
600600 RT_ASSERT (ptd != RT_NULL );
601601
602602 if (execute )
@@ -624,8 +624,8 @@ void pthread_cleanup_push(void (*routine)(void *), void *arg)
624624
625625 if (rt_thread_self () == NULL ) return ;
626626
627- /* get pthread data from user data of thread */
628- ptd = (_pthread_data_t * )rt_thread_self ()-> user_data ;
627+ /* get pthread data from pthread_data of thread */
628+ ptd = (_pthread_data_t * )rt_thread_self ()-> pthread_data ;
629629 RT_ASSERT (ptd != RT_NULL );
630630
631631 cleanup = (_pthread_cleanup_t * )rt_malloc (sizeof (_pthread_cleanup_t ));
@@ -676,8 +676,8 @@ int pthread_setcancelstate(int state, int *oldstate)
676676
677677 if (rt_thread_self () == NULL ) return EINVAL ;
678678
679- /* get pthread data from user data of thread */
680- ptd = (_pthread_data_t * )rt_thread_self ()-> user_data ;
679+ /* get pthread data from pthread_data of thread */
680+ ptd = (_pthread_data_t * )rt_thread_self ()-> pthread_data ;
681681 RT_ASSERT (ptd != RT_NULL );
682682
683683 if ((state == PTHREAD_CANCEL_ENABLE ) || (state == PTHREAD_CANCEL_DISABLE ))
@@ -699,8 +699,8 @@ int pthread_setcanceltype(int type, int *oldtype)
699699
700700 if (rt_thread_self () == NULL ) return EINVAL ;
701701
702- /* get pthread data from user data of thread */
703- ptd = (_pthread_data_t * )rt_thread_self ()-> user_data ;
702+ /* get pthread data from pthread_data of thread */
703+ ptd = (_pthread_data_t * )rt_thread_self ()-> pthread_data ;
704704 RT_ASSERT (ptd != RT_NULL );
705705
706706 if ((type != PTHREAD_CANCEL_DEFERRED ) && (type != PTHREAD_CANCEL_ASYNCHRONOUS ))
@@ -721,8 +721,8 @@ void pthread_testcancel(void)
721721
722722 if (rt_thread_self () == NULL ) return ;
723723
724- /* get pthread data from user data of thread */
725- ptd = (_pthread_data_t * )rt_thread_self ()-> user_data ;
724+ /* get pthread data from pthread_data of thread */
725+ ptd = (_pthread_data_t * )rt_thread_self ()-> pthread_data ;
726726 RT_ASSERT (ptd != RT_NULL );
727727
728728 if (ptd -> cancelstate == PTHREAD_CANCEL_ENABLE )
0 commit comments