summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1996-01-30 12:56:30 +0000
committerDavid Greenman <dg@FreeBSD.org>1996-01-30 12:56:30 +0000
commita1f403f52215f0af45f75bb4187e62091c0845bc (patch)
treef586ce05b33995597d75ec5cdea3fc89a9683d20
parent35b06fb39eb10aac12118e13abc1d7a1bc877484 (diff)
Notes
-rw-r--r--sys/i386/i386/swtch.s7
-rw-r--r--sys/i386/i386/vm_machdep.c14
2 files changed, 7 insertions, 14 deletions
diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s
index a232de20c19f..94b61105c81d 100644
--- a/sys/i386/i386/swtch.s
+++ b/sys/i386/i386/swtch.s
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: swtch.s,v 1.20.4.1 1996/01/29 12:28:27 davidg Exp $
+ * $Id: swtch.s,v 1.20.4.2 1996/01/30 09:19:27 davidg Exp $
*/
#include "npx.h" /* for NNPX */
@@ -508,7 +508,7 @@ ENTRY(mvesp)
* Update pcb, saving current processor state.
*/
ENTRY(savectx)
- /* PCB */
+ /* fetch PCB */
movl 4(%esp),%ecx
/* caller's return address - child won't execute this routine */
@@ -517,7 +517,8 @@ ENTRY(savectx)
movl $1,PCB_EAX(%ecx) /* return 1 in child */
movl %ebx,PCB_EBX(%ecx)
- movl %esp,PCB_ESP(%ecx)
+ leal 4(%esp),%eax /* stack minus return address */
+ movl %eax,PCB_ESP(%ecx)
movl %ebp,PCB_EBP(%ecx)
movl %esi,PCB_ESI(%ecx)
movl %edi,PCB_EDI(%ecx)
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c
index e15586c6183d..4cb9eb318d13 100644
--- a/sys/i386/i386/vm_machdep.c
+++ b/sys/i386/i386/vm_machdep.c
@@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
- * $Id: vm_machdep.c,v 1.39 1995/05/30 07:59:46 rgrimes Exp $
+ * $Id: vm_machdep.c,v 1.39.4.1 1996/01/29 12:28:28 davidg Exp $
*/
#include "npx.h"
@@ -571,17 +571,9 @@ cpu_fork(p1, p2)
pmap_activate(&p2->p_vmspace->vm_pmap, &up->u_pcb);
/*
- *
- * Arrange for a non-local goto when the new process
- * is started, to resume here, returning nonzero from setjmp.
+ * Return (0) in parent, (1) in child.
*/
- if (savectx(&up->u_pcb)) {
- /*
- * Return 1 in child.
- */
- return (1);
- }
- return (0);
+ return (savectx(&up->u_pcb));
}
void