From c79fbd373fc8b300cb2f4564aa934a4e93b81547 Mon Sep 17 00:00:00 2001 From: heyuanjie Date: Mon, 30 Jul 2018 11:12:12 +0800 Subject: [lwp]给thread添加lwp成员 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 642ea0e729..7e7e63594f 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -556,7 +556,11 @@ struct rt_thread void (*cleanup)(struct rt_thread *tid); /**< cleanup function when thread exit */ - rt_uint32_t user_data; /**< private user data beyond this thread */ + rt_uint32_t user_data; /**< private user data beyond this thread */ + +#ifdef RT_USING_LWP + struct rt_lwp *lwp; /**< if NULL it's a kernel thread */ +#endif }; typedef struct rt_thread *rt_thread_t; -- cgit v1.3.1 From 2373a9c7beaf52cb65630e32b080ef293504f6b5 Mon Sep 17 00:00:00 2001 From: heyuanjie Date: Tue, 31 Jul 2018 10:38:26 +0800 Subject: 添加lwp类型声明 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/rtdef.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/rtdef.h b/include/rtdef.h index 7e7e63594f..f8d90ceadb 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -496,6 +496,10 @@ typedef siginfo_t rt_siginfo_t; #define RT_THREAD_CTRL_CHANGE_PRIORITY 0x02 /**< Change thread priority. */ #define RT_THREAD_CTRL_INFO 0x03 /**< Get thread information. */ +#ifdef RT_USING_LWP +struct rt_lwp; +#endif + /** * Thread structure */ -- cgit v1.3.1