summaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorIngo Molnar2017-02-06 10:57:33 +0100
committerIngo Molnar2017-03-03 01:45:22 +0100
commit56cd697366b6d6f67acb6c58ac7f3b185d11ef07 (patch)
treec0866c89f50b5c511d88ab356845b4eb534cda87 /include/linux/sched.h
parentsched/headers: Move 'init_task' and 'init_thread_union' from <linux/sched.h> ... (diff)
downloadkernel-qcow2-linux-56cd697366b6d6f67acb6c58ac7f3b185d11ef07.tar.gz
kernel-qcow2-linux-56cd697366b6d6f67acb6c58ac7f3b185d11ef07.tar.xz
kernel-qcow2-linux-56cd697366b6d6f67acb6c58ac7f3b185d11ef07.zip
sched/headers: Move the task_lock()/unlock() APIs to <linux/sched/task.h>
The task_lock()/task_unlock() APIs are not realated to core scheduling, they are task lifetime APIs, i.e. they belong into <linux/sched/task.h>. Move them. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4ab105a2a8f9..d481c129a822 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1526,26 +1526,6 @@ static inline unsigned long wait_task_inactive(struct task_struct *p,
}
#endif
-/*
- * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring
- * subscriptions and synchronises with wait4(). Also used in procfs. Also
- * pins the final release of task.io_context. Also protects ->cpuset and
- * ->cgroup.subsys[]. And ->vfork_done.
- *
- * Nests both inside and outside of read_lock(&tasklist_lock).
- * It must not be nested with write_lock_irq(&tasklist_lock),
- * neither inside nor outside.
- */
-static inline void task_lock(struct task_struct *p)
-{
- spin_lock(&p->alloc_lock);
-}
-
-static inline void task_unlock(struct task_struct *p)
-{
- spin_unlock(&p->alloc_lock);
-}
-
/* set thread flags in other task's structures
* - see asm/thread_info.h for TIF_xxxx flags available
*/