[PATCH] kill SET_LINKS/REMOVE_LINKS
Both SET_LINKS() and SET_LINKS/REMOVE_LINKS() have exactly one caller, and these callers already check thread_group_leader(). This patch kills theese macros, they mix two different things: setting process's parent and registering it in init_task.tasks list. Callers are updated to do these actions by hand. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
9b678ece42
commit
c97d98931a
@@ -1186,18 +1186,6 @@ extern void wait_task_inactive(task_t * p);
|
||||
#define remove_parent(p) list_del_init(&(p)->sibling)
|
||||
#define add_parent(p) list_add_tail(&(p)->sibling,&(p)->parent->children)
|
||||
|
||||
#define REMOVE_LINKS(p) do { \
|
||||
if (thread_group_leader(p)) \
|
||||
list_del_init(&(p)->tasks); \
|
||||
remove_parent(p); \
|
||||
} while (0)
|
||||
|
||||
#define SET_LINKS(p) do { \
|
||||
if (thread_group_leader(p)) \
|
||||
list_add_tail(&(p)->tasks,&init_task.tasks); \
|
||||
add_parent(p); \
|
||||
} while (0)
|
||||
|
||||
#define next_task(p) list_entry((p)->tasks.next, struct task_struct, tasks)
|
||||
#define prev_task(p) list_entry((p)->tasks.prev, struct task_struct, tasks)
|
||||
|
||||
|
Reference in New Issue
Block a user