mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Adapt linux emulation to use cv for vfork wait.
Submitted by: Takahiro Kurosawa <takahiro.kurosawa gmail com> PR: kern/131506
This commit is contained in:
parent
99f41b91c3
commit
99b7f1a10b
2 changed files with 4 additions and 4 deletions
|
|
@ -560,7 +560,7 @@ linux_vfork(struct thread *td, struct linux_vfork_args *args)
|
|||
/* wait for the children to exit, ie. emulate vfork */
|
||||
PROC_LOCK(p2);
|
||||
while (p2->p_flag & P_PPWAIT)
|
||||
msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0);
|
||||
cv_wait(&p2->p_pwait, &p2->p_mtx);
|
||||
PROC_UNLOCK(p2);
|
||||
|
||||
return (0);
|
||||
|
|
@ -749,7 +749,7 @@ linux_clone(struct thread *td, struct linux_clone_args *args)
|
|||
/* wait for the children to exit, ie. emulate vfork */
|
||||
PROC_LOCK(p2);
|
||||
while (p2->p_flag & P_PPWAIT)
|
||||
msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0);
|
||||
cv_wait(&p2->p_pwait, &p2->p_mtx);
|
||||
PROC_UNLOCK(p2);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ linux_vfork(struct thread *td, struct linux_vfork_args *args)
|
|||
/* wait for the children to exit, ie. emulate vfork */
|
||||
PROC_LOCK(p2);
|
||||
while (p2->p_flag & P_PPWAIT)
|
||||
msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0);
|
||||
cv_wait(&p2->p_pwait, &p2->p_mtx);
|
||||
PROC_UNLOCK(p2);
|
||||
|
||||
return (0);
|
||||
|
|
@ -581,7 +581,7 @@ linux_clone(struct thread *td, struct linux_clone_args *args)
|
|||
/* wait for the children to exit, ie. emulate vfork */
|
||||
PROC_LOCK(p2);
|
||||
while (p2->p_flag & P_PPWAIT)
|
||||
msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0);
|
||||
cv_wait(&p2->p_pwait, &p2->p_mtx);
|
||||
PROC_UNLOCK(p2);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue