diff options
| author | Bernard Xiong <[email protected]> | 2018-07-31 12:00:25 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-07-31 12:00:25 +0800 |
| commit | 290eeb455b84ba06c62fcb40575e4837f677b4b5 (patch) | |
| tree | b1fd55c0615581ebf47f7817c2dd0ee03da8cab7 /include | |
| parent | e6fedb6e9bfbef07c4bcc065a5538d466abee19f (diff) | |
| parent | 2373a9c7beaf52cb65630e32b080ef293504f6b5 (diff) | |
Merge pull request #1675 from heyuanjie87/lwp
[lwp]给thread添加lwp成员
Diffstat (limited to 'include')
| -rw-r--r-- | include/rtdef.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/rtdef.h b/include/rtdef.h index 642ea0e729..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 */ @@ -556,7 +560,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; |
