|
@@ -60,6 +60,15 @@ static inline void clear_ti_thread_flag(struct thread_info *ti, int flag)
|
|
clear_bit(flag, (unsigned long *)&ti->flags);
|
|
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)
|
|
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);
|
|
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)
|
|
set_ti_thread_flag(current_thread_info(), flag)
|
|
#define clear_thread_flag(flag) \
|
|
#define clear_thread_flag(flag) \
|
|
clear_ti_thread_flag(current_thread_info(), 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) \
|
|
#define test_and_set_thread_flag(flag) \
|
|
test_and_set_ti_thread_flag(current_thread_info(), flag)
|
|
test_and_set_ti_thread_flag(current_thread_info(), flag)
|
|
#define test_and_clear_thread_flag(flag) \
|
|
#define test_and_clear_thread_flag(flag) \
|