summaryrefslogtreecommitdiff
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorAl Viro <viro@parcelfarce.linux.theplanet.co.uk>2005-11-14 03:06:57 +0300
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-14 05:14:13 +0300
commitf037360f2ed111fe89a8f5cb6ba351f4e9934e53 (patch)
tree5978627d4252a7faf6d4fb9577fe8aa55e5db648 /include/linux/sched.h
parent10ebffde3d3916026974352b7900e44afe2b243f (diff)
downloadlinux-f037360f2ed111fe89a8f5cb6ba351f4e9934e53.tar.xz
[PATCH] m68k: thread_info header cleanup
a) in smp_lock.h #include of sched.h and spinlock.h moved under #ifdef CONFIG_LOCK_KERNEL. b) interrupt.h now explicitly pulls sched.h (not via smp_lock.h from hardirq.h as it used to) c) in three more places we need changes to compensate for (a) - one place in arch/sparc needs string.h now, hardirq.h needs forward declaration of task_struct and preempt.h needs direct include of thread_info.h. d) thread_info-related helpers in sched.h and thread_info.h put under ifndef __HAVE_THREAD_FUNCTIONS. Obviously safe. 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 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index e4681256e43e..41df81395719 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1233,6 +1233,8 @@ static inline void task_unlock(struct task_struct *p)
spin_unlock(&p->alloc_lock);
}
+#ifndef __HAVE_THREAD_FUNCTIONS
+
#define task_thread_info(task) (task)->thread_info
static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org)
@@ -1246,6 +1248,8 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
return (unsigned long *)(p->thread_info + 1);
}
+#endif
+
/* set thread flags in other task's structures
* - see asm/thread_info.h for TIF_xxxx flags available
*/