aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorAl Viro <viro@parcelfarce.linux.theplanet.co.uk>2005-11-13 19:06:55 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-13 21:14:13 -0500
commita1261f54611ec4ad6a7ab7080f86747e3ac3685b (patch)
tree8a65c419da590e3712543f69284fb5f8cd613a37 /kernel/sched.c
parent7feacd53347c04aee789ba5d632eda0c3fc421c4 (diff)
[PATCH] m68k: introduce task_thread_info
new helper - task_thread_info(task). On platforms that have thread_info allocated separately (i.e. in default case) it simply returns task->thread_info. m68k wants (and for good reasons) to embed its thread_info into task_struct. So it will (in later patch) have task_thread_info() of its own. For now we just add a macro for generic case and convert existing instances of its body in core kernel to uses of new macro. Obviously safe - all normal architectures get the same preprocessor output they used to get. Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index b6506671b2be..831f7e9d8f1c 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1437,7 +1437,7 @@ void fastcall sched_fork(task_t *p, int clone_flags)
1437#endif 1437#endif
1438#ifdef CONFIG_PREEMPT 1438#ifdef CONFIG_PREEMPT
1439 /* Want to start with kernel preemption disabled. */ 1439 /* Want to start with kernel preemption disabled. */
1440 p->thread_info->preempt_count = 1; 1440 task_thread_info(p)->preempt_count = 1;
1441#endif 1441#endif
1442 /* 1442 /*
1443 * Share the timeslice between parent and child, thus the 1443 * Share the timeslice between parent and child, thus the
@@ -4410,9 +4410,9 @@ void __devinit init_idle(task_t *idle, int cpu)
4410 4410
4411 /* Set the preempt count _outside_ the spinlocks! */ 4411 /* Set the preempt count _outside_ the spinlocks! */
4412#if defined(CONFIG_PREEMPT) && !defined(CONFIG_PREEMPT_BKL) 4412#if defined(CONFIG_PREEMPT) && !defined(CONFIG_PREEMPT_BKL)
4413 idle->thread_info->preempt_count = (idle->lock_depth >= 0); 4413 task_thread_info(idle)->preempt_count = (idle->lock_depth >= 0);
4414#else 4414#else
4415 idle->thread_info->preempt_count = 0; 4415 task_thread_info(idle)->preempt_count = 0;
4416#endif 4416#endif
4417} 4417}
4418 4418