Make sure that *fork() always returns with %edx == 1 in the

child.  This was sometimes not happening correctly during my
threads code work.
This commit is contained in:
dyson 1997-05-05 04:08:12 +00:00
parent ed817524a2
commit 16cf7a4978
3 changed files with 6 additions and 3 deletions

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.92 1997/04/14 13:52:52 bde Exp $
* $Id: trap.c,v 1.93 1997/04/26 11:45:28 peter Exp $
*/
/*
@ -967,6 +967,7 @@ fork_return(p, frame)
{
frame.tf_eax = 0; /* Child returns zero */
frame.tf_eflags &= ~PSL_C; /* success */
frame.tf_edx = 1;
userret(p, &frame, 0);
#ifdef KTRACE

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.92 1997/04/14 13:52:52 bde Exp $
* $Id: trap.c,v 1.93 1997/04/26 11:45:28 peter Exp $
*/
/*
@ -967,6 +967,7 @@ fork_return(p, frame)
{
frame.tf_eax = 0; /* Child returns zero */
frame.tf_eflags &= ~PSL_C; /* success */
frame.tf_edx = 1;
userret(p, &frame, 0);
#ifdef KTRACE

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.92 1997/04/14 13:52:52 bde Exp $
* $Id: trap.c,v 1.93 1997/04/26 11:45:28 peter Exp $
*/
/*
@ -967,6 +967,7 @@ fork_return(p, frame)
{
frame.tf_eax = 0; /* Child returns zero */
frame.tf_eflags &= ~PSL_C; /* success */
frame.tf_edx = 1;
userret(p, &frame, 0);
#ifdef KTRACE