mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Use the reference-counted PHOLD()/PRELE() rather than P_NOSWAP.
This commit is contained in:
parent
88b4f4ee55
commit
af8ad83e5c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=45357
@ -36,7 +36,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)kern_fork.c 8.6 (Berkeley) 4/8/94
|
* @(#)kern_fork.c 8.6 (Berkeley) 4/8/94
|
||||||
* $Id: kern_fork.c,v 1.55 1999/01/26 02:38:10 julian Exp $
|
* $Id: kern_fork.c,v 1.56 1999/03/02 00:28:08 julian Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opt_ktrace.h"
|
#include "opt_ktrace.h"
|
||||||
@ -439,7 +439,7 @@ fork1(p1, flags)
|
|||||||
* This begins the section where we must prevent the parent
|
* This begins the section where we must prevent the parent
|
||||||
* from being swapped.
|
* from being swapped.
|
||||||
*/
|
*/
|
||||||
p1->p_flag |= P_NOSWAP;
|
PHOLD(p1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Finish creating the child process. It will return via a different
|
* Finish creating the child process. It will return via a different
|
||||||
@ -470,7 +470,7 @@ fork1(p1, flags)
|
|||||||
/*
|
/*
|
||||||
* Now can be swapped.
|
* Now can be swapped.
|
||||||
*/
|
*/
|
||||||
p1->p_flag &= ~P_NOSWAP;
|
PRELE(p1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Preserve synchronization semantics of vfork. If waiting for
|
* Preserve synchronization semantics of vfork. If waiting for
|
||||||
|
Loading…
Reference in New Issue
Block a user