aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2bbf968b23d9..f8650314ba2f 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1233,32 +1233,34 @@ static inline void task_unlock(struct task_struct *p)
1233 spin_unlock(&p->alloc_lock); 1233 spin_unlock(&p->alloc_lock);
1234} 1234}
1235 1235
1236#define task_thread_info(task) (task)->thread_info
1237
1236/* set thread flags in other task's structures 1238/* set thread flags in other task's structures
1237 * - see asm/thread_info.h for TIF_xxxx flags available 1239 * - see asm/thread_info.h for TIF_xxxx flags available
1238 */ 1240 */
1239static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag) 1241static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag)
1240{ 1242{
1241 set_ti_thread_flag(tsk->thread_info,flag); 1243 set_ti_thread_flag(task_thread_info(tsk), flag);
1242} 1244}
1243 1245
1244static inline void clear_tsk_thread_flag(struct task_struct *tsk, int flag) 1246static inline void clear_tsk_thread_flag(struct task_struct *tsk, int flag)
1245{ 1247{
1246 clear_ti_thread_flag(tsk->thread_info,flag); 1248 clear_ti_thread_flag(task_thread_info(tsk), flag);
1247} 1249}
1248 1250
1249static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag) 1251static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag)
1250{ 1252{
1251 return test_and_set_ti_thread_flag(tsk->thread_info,flag); 1253 return test_and_set_ti_thread_flag(task_thread_info(tsk), flag);
1252} 1254}
1253 1255
1254static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag) 1256static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag)
1255{ 1257{
1256 return test_and_clear_ti_thread_flag(tsk->thread_info,flag); 1258 return test_and_clear_ti_thread_flag(task_thread_info(tsk), flag);
1257} 1259}
1258 1260
1259static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag) 1261static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag)
1260{ 1262{
1261 return test_ti_thread_flag(tsk->thread_info,flag); 1263 return test_ti_thread_flag(task_thread_info(tsk), flag);
1262} 1264}
1263 1265
1264static inline void set_tsk_need_resched(struct task_struct *tsk) 1266static inline void set_tsk_need_resched(struct task_struct *tsk)
@@ -1329,12 +1331,12 @@ extern void signal_wake_up(struct task_struct *t, int resume_stopped);
1329 1331
1330static inline unsigned int task_cpu(const struct task_struct *p) 1332static inline unsigned int task_cpu(const struct task_struct *p)
1331{ 1333{
1332 return p->thread_info->cpu; 1334 return task_thread_info(p)->cpu;
1333} 1335}
1334 1336
1335static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) 1337static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
1336{ 1338{
1337 p->thread_info->cpu = cpu; 1339 task_thread_info(p)->cpu = cpu;
1338} 1340}
1339 1341
1340#else 1342#else