diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-04-08 21:31:53 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-04-08 21:31:53 -0700 |
| commit | 52a4a8b77985bf6695d1506cf0af74b624dee41f (patch) | |
| tree | 7c975685dc7af79393b0f361ca77e800764682c6 /include/linux | |
| parent | 598ee77158db8295edbd5e9d850e4e0fddbe9afc (diff) | |
[PATCH] task_lock commentary fixes
From: Manfred Spraul <manfred@colorfullife.com>
Update and clarify the incorrect commentary around task_lock()
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sched.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index f3b4c5891898..bbc51fac0cf6 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -686,7 +686,11 @@ static inline int thread_group_empty(task_t *p) extern void unhash_process(struct task_struct *p); -/* Protects ->fs, ->files, ->mm, and synchronises with wait4(). Nests inside tasklist_lock */ +/* Protects ->fs, ->files, ->mm, and synchronises with wait4(). + * 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); |
