diff options
| author | James Morris <james.morris@microsoft.com> | 2018-06-25 09:20:40 -0700 |
|---|---|---|
| committer | James Morris <james.morris@microsoft.com> | 2018-06-25 09:20:40 -0700 |
| commit | 57b54d74dd5c559bd35f2affaf11d8828aaf5733 (patch) | |
| tree | 025d99f0d6b298fbdbf3ce942ec7868131444090 /include/linux/thread_info.h | |
| parent | 65793f3cd93abf4ca1109f78e07c1b7193abdfec (diff) | |
| parent | 7daf201d7fe8334e2d2364d4e8ed3394ec9af819 (diff) | |
Merge tag 'v4.18-rc2' into next-general
Merge to Linux 4.18-rc2 for security subsystem developers.
Diffstat (limited to 'include/linux/thread_info.h')
| -rw-r--r-- | include/linux/thread_info.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index cf2862bd134a..8d8821b3689a 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h @@ -60,6 +60,15 @@ static inline void clear_ti_thread_flag(struct thread_info *ti, int flag) clear_bit(flag, (unsigned long *)&ti->flags); } +static inline void update_ti_thread_flag(struct thread_info *ti, int flag, + bool value) +{ + if (value) + set_ti_thread_flag(ti, flag); + else + clear_ti_thread_flag(ti, flag); +} + static inline int test_and_set_ti_thread_flag(struct thread_info *ti, int flag) { return test_and_set_bit(flag, (unsigned long *)&ti->flags); @@ -79,6 +88,8 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag) set_ti_thread_flag(current_thread_info(), flag) #define clear_thread_flag(flag) \ clear_ti_thread_flag(current_thread_info(), flag) +#define update_thread_flag(flag, value) \ + update_ti_thread_flag(current_thread_info(), flag, value) #define test_and_set_thread_flag(flag) \ test_and_set_ti_thread_flag(current_thread_info(), flag) #define test_and_clear_thread_flag(flag) \ |
