diff options
| author | xiangxistu <[email protected]> | 2022-08-08 11:16:17 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-08-07 23:16:17 -0400 |
| commit | e61d05ca1a9e6b8a83c928ab1f893246629bbd2f (patch) | |
| tree | 969c06f626d801311ea827bdd0c0e0bea878e7ef /src | |
| parent | 79934777d04eddc54f6e608398091aaef6cc2aa4 (diff) | |
[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".
Diffstat (limited to 'src')
| -rw-r--r-- | src/thread.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/thread.c b/src/thread.c index eea42dab8e..f840fdd231 100644 --- a/src/thread.c +++ b/src/thread.c @@ -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 */ |
