PERFORCE change 113124 for review
Roman Divacky
rdivacky at FreeBSD.org
Thu Jan 18 17:16:31 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=113124
Change 113124 by rdivacky at rdivacky_witten on 2007/01/18 17:16:14
Set the P_PPWAIT flag when the proc is locked.
Suggested by: jhb
Affected files ...
.. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#24 edit
.. //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#17 edit
Differences ...
==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#24 (text+ko) ====
@@ -533,7 +533,9 @@
if (error)
return (error);
+ PROC_LOCK(p2);
p2->p_flag |= P_PPWAIT;
+ PROC_UNLOCK(p2);
td2 = FIRST_THREAD_IN_PROC(p2);
@@ -709,8 +711,11 @@
printf(LMSG("clone: successful rfork to %ld, stack %p sig = %d"),
(long)p2->p_pid, args->stack, exit_signal);
#endif
- if (args->flags & CLONE_VFORK)
+ if (args->flags & CLONE_VFORK) {
+ PROC_LOCK(p2);
p2->p_flag |= P_PPWAIT;
+ PROC_UNLOCK(p2);
+ }
/*
* Make this runnable after we are finished with it.
==== //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#17 (text+ko) ====
@@ -356,7 +356,9 @@
if (error)
return (error);
+ PROC_LOCK(p2);
p2->p_flag |= P_PPWAIT;
+ PROC_UNLOCK(p2);
td2 = FIRST_THREAD_IN_PROC(p2);
@@ -546,8 +548,11 @@
printf(LMSG("clone: successful rfork to %ld, stack %p sig = %d"),
(long)p2->p_pid, args->stack, exit_signal);
#endif
- if (args->flags & CLONE_VFORK)
+ if (args->flags & CLONE_VFORK) {
+ PROC_LOCK(p2);
p2->p_flag |= P_PPWAIT;
+ PROC_UNLOCK(p2);
+ }
/*
* Make this runnable after we are finished with it.
More information about the p4-projects
mailing list