Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Apr 1996 05:56:44 +0000
From:      Poul-Henning Kamp <phk@critter.tfs.com>
To:        davidg@Root.COM
Cc:        Poul-Henning Kamp <phk@freefall.freebsd.org>, CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-sys@freefall.freebsd.org
Subject:   Re: cvs commit: src/sys/i386/i386 swtch.s vm_machdep.c src/sys/i386/include pcb.h src/sys/i386/isa wd.c 
Message-ID:  <29338.829893404@critter.tfs.com>
In-Reply-To: Your message of "Thu, 18 Apr 1996 18:26:18 MST." <199604190126.SAA08890@Root.COM> 

next in thread | previous in thread | raw e-mail | index | archive | help
> >phk         96/04/18 14:37:49
> >
> >  Modified:    sys/i386/i386  swtch.s vm_machdep.c
> >               sys/i386/include  pcb.h
> >  Log:
> >  Fix a bogon.  cpu_fork & savectx ecpected cpu_switch to restore %eax,
> >  they shouldn't.
> 
>    Oh? Why shouldn't they? The code as it was written looks correct to me (I
> wrote it, so this shouldn't be too surprising :-)).

Basically calling savectx() means that you will return in the child via
cpu_switch().  cpu_switch() returns void, QED: so must savectx().  That's
probably the only thing I forgot: savectx's prototype (will fix).

We save about 6 clock cycles in cpu_switch but not caring about %eax :-)

--
Poul-Henning Kamp           | phk@FreeBSD.ORG       FreeBSD Core-team.
http://www.freebsd.org/~phk | phk@login.dknet.dk    Private mailbox.
whois: [PHK]                | phk@ref.tfs.com       TRW Financial Systems, Inc.
Future will arrive by its own means, progress not so.



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