From e61d05ca1a9e6b8a83c928ab1f893246629bbd2f Mon Sep 17 00:00:00 2001 From: xiangxistu <52819708+xiangxistu@users.noreply.github.com> Date: Mon, 8 Aug 2022 11:16:17 +0800 Subject: [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". --- include/rtdef.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/rtdef.h b/include/rtdef.h index 94c2466f0b..0de2c22ec4 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -690,9 +690,13 @@ struct rt_thread rt_ubase_t remaining_tick; /**< remaining tick */ #ifdef RT_USING_CPU_USAGE - rt_uint64_t duration_tick; /**< cpu usage tick */ + rt_uint64_t duration_tick; /**< cpu usage tick */ #endif /* RT_USING_CPU_USAGE */ +#ifdef RT_USING_PTHREADS + void *pthread_data; /**< the handle of pthread data, adapt 32/64bit */ +#endif /* RT_USING_PTHREADS */ + struct rt_timer thread_timer; /**< built-in thread timer */ void (*cleanup)(struct rt_thread *tid); /**< cleanup function when thread exit */ -- cgit v1.3.1