diff -urN RC13-git7-mac-fonts/include/linux/sched.h RC13-git7-task_thread_info/include/linux/sched.h --- RC13-git7-mac-fonts/include/linux/sched.h 2005-08-28 23:09:49.000000000 -0400 +++ RC13-git7-task_thread_info/include/linux/sched.h 2005-09-07 13:54:59.000000000 -0400 @@ -1136,32 +1136,34 @@ spin_unlock(&p->alloc_lock); } +#define task_thread_info(task) (task)->thread_info + /* set thread flags in other task's structures * - see asm/thread_info.h for TIF_xxxx flags available */ static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag) { - set_ti_thread_flag(tsk->thread_info,flag); + set_ti_thread_flag(task_thread_info(tsk), flag); } static inline void clear_tsk_thread_flag(struct task_struct *tsk, int flag) { - clear_ti_thread_flag(tsk->thread_info,flag); + clear_ti_thread_flag(task_thread_info(tsk), flag); } static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag) { - return test_and_set_ti_thread_flag(tsk->thread_info,flag); + return test_and_set_ti_thread_flag(task_thread_info(tsk), flag); } static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag) { - return test_and_clear_ti_thread_flag(tsk->thread_info,flag); + return test_and_clear_ti_thread_flag(task_thread_info(tsk), flag); } static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag) { - return test_ti_thread_flag(tsk->thread_info,flag); + return test_ti_thread_flag(task_thread_info(tsk), flag); } static inline void set_tsk_need_resched(struct task_struct *tsk) @@ -1232,12 +1234,12 @@ static inline unsigned int task_cpu(const struct task_struct *p) { - return p->thread_info->cpu; + return task_thread_info(p)->cpu; } static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) { - p->thread_info->cpu = cpu; + task_thread_info(p)->cpu = cpu; } #else diff -urN RC13-git7-mac-fonts/kernel/exit.c RC13-git7-task_thread_info/kernel/exit.c --- RC13-git7-mac-fonts/kernel/exit.c 2005-08-28 23:09:49.000000000 -0400 +++ RC13-git7-task_thread_info/kernel/exit.c 2005-09-07 13:54:59.000000000 -0400 @@ -846,7 +846,7 @@ if (group_dead && tsk->signal->leader) disassociate_ctty(1); - module_put(tsk->thread_info->exec_domain->module); + module_put(task_thread_info(tsk)->exec_domain->module); if (tsk->binfmt) module_put(tsk->binfmt->module); diff -urN RC13-git7-mac-fonts/kernel/fork.c RC13-git7-task_thread_info/kernel/fork.c --- RC13-git7-mac-fonts/kernel/fork.c 2005-09-05 07:05:16.000000000 -0400 +++ RC13-git7-task_thread_info/kernel/fork.c 2005-09-07 13:54:59.000000000 -0400 @@ -898,7 +898,7 @@ if (nr_threads >= max_threads) goto bad_fork_cleanup_count; - if (!try_module_get(p->thread_info->exec_domain->module)) + if (!try_module_get(task_thread_info(p)->exec_domain->module)) goto bad_fork_cleanup_count; if (p->binfmt && !try_module_get(p->binfmt->module)) @@ -1154,7 +1154,7 @@ if (p->binfmt) module_put(p->binfmt->module); bad_fork_cleanup_put_domain: - module_put(p->thread_info->exec_domain->module); + module_put(task_thread_info(p)->exec_domain->module); bad_fork_cleanup_count: put_group_info(p->group_info); atomic_dec(&p->user->processes); diff -urN RC13-git7-mac-fonts/kernel/sched.c RC13-git7-task_thread_info/kernel/sched.c --- RC13-git7-mac-fonts/kernel/sched.c 2005-08-28 23:09:49.000000000 -0400 +++ RC13-git7-task_thread_info/kernel/sched.c 2005-09-07 13:54:59.000000000 -0400 @@ -1317,7 +1317,7 @@ #endif #ifdef CONFIG_PREEMPT /* Want to start with kernel preemption disabled. */ - p->thread_info->preempt_count = 1; + task_thread_info(p)->preempt_count = 1; #endif /* * Share the timeslice between parent and child, thus the @@ -4204,9 +4204,9 @@ /* Set the preempt count _outside_ the spinlocks! */ #if defined(CONFIG_PREEMPT) && !defined(CONFIG_PREEMPT_BKL) - idle->thread_info->preempt_count = (idle->lock_depth >= 0); + task_thread_info(idle)->preempt_count = (idle->lock_depth >= 0); #else - idle->thread_info->preempt_count = 0; + task_thread_info(idle)->preempt_count = 0; #endif }