aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-11-13 23:28:58 -0500
committerSteve French <sfrench@us.ibm.com>2005-11-13 23:28:58 -0500
commit7b0a65f9923ffe7885a5473648baaa3a1a701726 (patch)
treeb9be4a0504b4e637b86bdc92d88268ff57ea1bc5 /include/linux/sched.h
parent1b98a8221e3c9c86ae7e292ba7542d2dd6f10eb9 (diff)
parentee90f62b3e69d0cd9f8edc6b95f07b1a8c38aaf4 (diff)
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h32
1 files changed, 24 insertions, 8 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2bbf968b23d9..2038bd27b041 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -357,7 +357,6 @@ struct mm_struct {
357 /* aio bits */ 357 /* aio bits */
358 rwlock_t ioctx_list_lock; 358 rwlock_t ioctx_list_lock;
359 struct kioctx *ioctx_list; 359 struct kioctx *ioctx_list;
360 struct kioctx default_kioctx;
361}; 360};
362 361
363struct sighand_struct { 362struct sighand_struct {
@@ -1233,32 +1232,49 @@ static inline void task_unlock(struct task_struct *p)
1233 spin_unlock(&p->alloc_lock); 1232 spin_unlock(&p->alloc_lock);
1234} 1233}
1235 1234
1235#ifndef __HAVE_THREAD_FUNCTIONS
1236
1237#define task_thread_info(task) (task)->thread_info
1238
1239static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org)
1240{
1241 *task_thread_info(p) = *task_thread_info(org);
1242 task_thread_info(p)->task = p;
1243}
1244
1245static inline unsigned long *end_of_stack(struct task_struct *p)
1246{
1247 return (unsigned long *)(p->thread_info + 1);
1248}
1249
1250#endif
1251
1236/* set thread flags in other task's structures 1252/* set thread flags in other task's structures
1237 * - see asm/thread_info.h for TIF_xxxx flags available 1253 * - see asm/thread_info.h for TIF_xxxx flags available
1238 */ 1254 */
1239static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag) 1255static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag)
1240{ 1256{
1241 set_ti_thread_flag(tsk->thread_info,flag); 1257 set_ti_thread_flag(task_thread_info(tsk), flag);
1242} 1258}
1243 1259
1244static inline void clear_tsk_thread_flag(struct task_struct *tsk, int flag) 1260static inline void clear_tsk_thread_flag(struct task_struct *tsk, int flag)
1245{ 1261{
1246 clear_ti_thread_flag(tsk->thread_info,flag); 1262 clear_ti_thread_flag(task_thread_info(tsk), flag);
1247} 1263}
1248 1264
1249static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag) 1265static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag)
1250{ 1266{
1251 return test_and_set_ti_thread_flag(tsk->thread_info,flag); 1267 return test_and_set_ti_thread_flag(task_thread_info(tsk), flag);
1252} 1268}
1253 1269
1254static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag) 1270static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag)
1255{ 1271{
1256 return test_and_clear_ti_thread_flag(tsk->thread_info,flag); 1272 return test_and_clear_ti_thread_flag(task_thread_info(tsk), flag);
1257} 1273}
1258 1274
1259static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag) 1275static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag)
1260{ 1276{
1261 return test_ti_thread_flag(tsk->thread_info,flag); 1277 return test_ti_thread_flag(task_thread_info(tsk), flag);
1262} 1278}
1263 1279
1264static inline void set_tsk_need_resched(struct task_struct *tsk) 1280static inline void set_tsk_need_resched(struct task_struct *tsk)
@@ -1329,12 +1345,12 @@ extern void signal_wake_up(struct task_struct *t, int resume_stopped);
1329 1345
1330static inline unsigned int task_cpu(const struct task_struct *p) 1346static inline unsigned int task_cpu(const struct task_struct *p)
1331{ 1347{
1332 return p->thread_info->cpu; 1348 return task_thread_info(p)->cpu;
1333} 1349}
1334 1350
1335static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) 1351static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
1336{ 1352{
1337 p->thread_info->cpu = cpu; 1353 task_thread_info(p)->cpu = cpu;
1338} 1354}
1339 1355
1340#else 1356#else