+#define add_parent(p, parent) list_add_tail(&(p)->sibling,&(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, (p)->parent); \
+ } while (0)