summaryrefslogtreecommitdiffstats
path: root/sys/alpha/linux/linux_machdep.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-03-06 02:59:46 +0000
committerjhb <jhb@FreeBSD.org>2001-03-06 02:59:46 +0000
commit56db3fe70fc771eb62f56e1b99798364cf1da7c1 (patch)
treef406e1b923c5ac3a2e65a0f05ad9d340a4008983 /sys/alpha/linux/linux_machdep.c
parentd2412f510338c541ebc02157fa423d214c727836 (diff)
downloadFreeBSD-src-56db3fe70fc771eb62f56e1b99798364cf1da7c1.zip
FreeBSD-src-56db3fe70fc771eb62f56e1b99798364cf1da7c1.tar.gz
Create clone'd linux processes as stopped processes at first and don't
actually make them runnable until after the emulator layer has had a chance to perform fixups.
Diffstat (limited to 'sys/alpha/linux/linux_machdep.c')
-rw-r--r--sys/alpha/linux/linux_machdep.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/alpha/linux/linux_machdep.c b/sys/alpha/linux/linux_machdep.c
index 902a81c..58905c9 100644
--- a/sys/alpha/linux/linux_machdep.c
+++ b/sys/alpha/linux/linux_machdep.c
@@ -118,7 +118,7 @@ linux_vfork(struct proc *p, struct linux_vfork_args *args)
int
linux_clone(struct proc *p, struct linux_clone_args *args)
{
- int error, ff = RFPROC;
+ int error, ff = RFPROC | RFSTOPPED;
struct proc *p2;
int exit_signal;
vm_offset_t start;
@@ -175,8 +175,15 @@ linux_clone(struct proc *p, struct linux_clone_args *args)
(long)p2->p_pid, args->stack, exit_signal);
#endif
+ /*
+ * Make this runnable after we are finished with it.
+ */
+ mtx_lock_spin(&sched_lock);
+ p2->p_stat = SRUN;
+ setrunqueue(p2);
+ mtx_unlock_spin(&sched_lock);
+
return (0);
-
}
#define STACK_SIZE (2 * 1024 * 1024)
OpenPOWER on IntegriCloud