summaryrefslogtreecommitdiff
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-09-21 19:55:31 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-30 13:35:55 -0400
commit2aa3a7f8660355c3dddead17e224545c1a3d5a5f (patch)
treed106fcaeb6b66e09591cf8ec28c836be93f4d837 /include/linux/sched.h
parenta4d94ff8aa864c05b33c2de1f8c5d0176d7a4b63 (diff)
preparation for generic kernel_thread()
Let architectures select GENERIC_KERNEL_THREAD and have their copy_thread() treat NULL regs as "it came from kernel_thread(), sp argument contains the function new thread will be calling and stack_size - the argument for that function". Switching the architectures begins shortly... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 23bddac4bad8..34da9340c6a4 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2325,6 +2325,9 @@ extern int do_execve(const char *,
const char __user * const __user *, struct pt_regs *);
extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *);
struct task_struct *fork_idle(int);
+#ifdef CONFIG_GENERIC_KERNEL_THREAD
+extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
+#endif
extern void set_task_comm(struct task_struct *tsk, char *from);
extern char *get_task_comm(char *to, struct task_struct *tsk);