diff options
author | kib <kib@FreeBSD.org> | 2009-02-18 16:11:39 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-02-18 16:11:39 +0000 |
commit | 021a7529aea6c7c6aba4b566c2251f00df49ca2c (patch) | |
tree | b60a1052499beaf604c030f9af060fb15c563a15 /sys | |
parent | efd9871c93b6abc630c10feb8a72fe4e5f5a186b (diff) | |
download | FreeBSD-src-021a7529aea6c7c6aba4b566c2251f00df49ca2c.zip FreeBSD-src-021a7529aea6c7c6aba4b566c2251f00df49ca2c.tar.gz |
Adapt linux emulation to use cv for vfork wait.
Submitted by: Takahiro Kurosawa <takahiro.kurosawa gmail com>
PR: kern/131506
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/linux32/linux32_machdep.c | 4 | ||||
-rw-r--r-- | sys/i386/linux/linux_machdep.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index c8869e2..eb91623 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -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); } diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c index 7f727ac..9d078af 100644 --- a/sys/i386/linux/linux_machdep.c +++ b/sys/i386/linux/linux_machdep.c @@ -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); } |