Skip site navigation (1)Skip section navigation (2)
Date:      11 Mar 2001 19:55:54 +0100
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        cvs-committers@FreeBSD.org
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/i386/linux linux_machdep.c
Message-ID:  <xzpvgpgi18l.fsf@flood.ping.uio.no>
In-Reply-To: Dag-Erling Smorgrav's message of "Sun, 11 Mar 2001 10:52:11 -0800 (PST)"
References:  <200103111852.f2BIqBw46583@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=

Dag-Erling Smorgrav <des@FreeBSD.org> writes:
>   Log:
>   rfork() masks RFSTOPPED out of the flags it passes to fork1(), so we have
>   to call fork1() directly if we don't want out process queued right away.
>   This has the serendipitous side effect of saving us a call to pfind().

Attached is an equivalent patch for the Alpha; I'll leave it to
someone who actually has one to commit it.

DES
-- 
Dag-Erling Smorgrav - des@ofug.org


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=linux-alpha.diff

Index: linux_machdep.c
===================================================================
RCS file: /home/ncvs/src/sys/alpha/linux/linux_machdep.c,v
retrieving revision 1.11
diff -u -r1.11 linux_machdep.c
--- linux_machdep.c	2001/03/06 02:55:23	1.11
+++ linux_machdep.c	2001/03/11 18:42:19
@@ -122,7 +122,6 @@
 	struct proc *p2;
 	int exit_signal;
 	vm_offset_t start;
-	struct rfork_args rf_args;
 
 #ifdef DEBUG
 	if (ldebug(clone)) {
@@ -156,14 +155,9 @@
 	error = 0;
 	start = 0;
 
-	rf_args.flags = ff;
-	if ((error = rfork(p, &rf_args)) != 0)
+	if ((error = fork1(p, ff, &p2)) != 0)
 		return (error);
 
-	p2 = pfind(p->p_retval[0]);
-	if (p2 == NULL)
-		return (ESRCH);
-
 	PROC_LOCK(p);
 	p2->p_sigparent = exit_signal;
 	PROC_UNLOCK(p);
@@ -183,6 +177,8 @@
 	setrunqueue(p2);
 	mtx_unlock_spin(&sched_lock);
 
+	p->p_retval[0] = p2->p_pid;
+	p->p_retval[1] = 0;
 	return (0);
 }
 

--=-=-=--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpvgpgi18l.fsf>