Messages in this thread Patch in this message | | | Date | Sat, 22 Jun 2002 04:36:53 -0600 (MDT) | From | Thunder from the hill <> | Subject | [Q] change_parent() - would this work? |
| |
Hi,
My question is: would this work?
Index: thunder-2.5/include/linux/sched.h =================================================================== RCS file: thunder-2.5/include/linux/sched.h,v retrieving revision 1.2 diff -u -r1.2 thunder-2.5/include/linux/sched.h --- thunder-2.5/include/linux/sched.h 22 Jun 2002 01:51:33 -0000 1.2 +++ thunder-2.5/include/linux/sched.h 22 Jun 2002 10:33:57 -0000 @@ -716,6 +716,7 @@ #define remove_parent(p) list_del_init(&(p)->sibling) #define add_parent(p, parent) list_add_tail(&(p)->sibling,&(parent)->children) +#define change_parent(p) list_move_tail(&(p)->sibling,&(parent)->children) #define REMOVE_LINKS(p) do { \ list_del_init(&(p)->tasks); \ Index: thunder-2.5/kernel/exit.c =================================================================== RCS file: thunder-2.5/kernel/exit.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 thunder-2.5/kernel/exit.c --- thunder-2.5/kernel/exit.c 20 Jun 2002 22:53:49 -0000 1.1.1.1 +++ thunder-2.5/kernel/exit.c 22 Jun 2002 10:33:57 -0000 @@ -636,8 +636,7 @@ /* move to end of parent's list to avoid starvation */ write_lock_irq(&tasklist_lock); - remove_parent(p); - add_parent(p, p->parent); + change_parent(p, p->parent); write_unlock_irq(&tasklist_lock); retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0; if (!retval && stat_addr) Regards, Thunder -- "You must cut down the mighties tree in the forest with - a herring!" -- chief of the knights who to recently said "NIH"
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |