[fix] the risk for function exit() when open pthread support. (#6229)

* [fix] the risk for function exit() when open pthread support.
* [update] modify annotation from "user data" to "pthread_data".
This commit is contained in:
xiangxistu
2022-08-07 23:16:17 -04:00
committed by GitHub
parent 79934777d0
commit e61d05ca1a
4 changed files with 31 additions and 20 deletions
+4
View File
@@ -252,6 +252,10 @@ static rt_err_t _thread_init(struct rt_thread *thread,
thread->duration_tick = 0;
#endif /* RT_USING_CPU_USAGE */
#ifdef RT_USING_PTHREADS
thread->pthread_data = RT_NULL;
#endif /* RT_USING_PTHREADS */
#ifdef RT_USING_MODULE
thread->module_id = 0;
#endif /* RT_USING_MODULE */