summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorOleg Nesterov2009-07-10 03:48:23 +0200
committerJames Morris2009-07-17 01:10:42 +0200
commit5bb459bb45d1ad3c177485dcf0af01580aa31125 (patch)
treefd6d11d424d222b97f56d8b870bdecbacaab8a17 /include/linux
parentkernel: fix is_single_threaded (diff)
downloadkernel-qcow2-linux-5bb459bb45d1ad3c177485dcf0af01580aa31125.tar.gz
kernel-qcow2-linux-5bb459bb45d1ad3c177485dcf0af01580aa31125.tar.xz
kernel-qcow2-linux-5bb459bb45d1ad3c177485dcf0af01580aa31125.zip
kernel: rename is_single_threaded(task) to current_is_single_threaded(void)
- is_single_threaded(task) is not safe unless task == current, we can't use task->signal or task->mm. - it doesn't make sense unless task == current, the task can fork right after the check. Rename it to current_is_single_threaded() and kill the argument. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 16a982e389fb..0839a2c9b952 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2075,7 +2075,7 @@ static inline unsigned long wait_task_inactive(struct task_struct *p,
#define for_each_process(p) \
for (p = &init_task ; (p = next_task(p)) != &init_task ; )
-extern bool is_single_threaded(struct task_struct *);
+extern bool current_is_single_threaded(void);
/*
* Careful: do_each_thread/while_each_thread is a double loop so