From owner-cvs-sys Fri Apr 19 00:07:44 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id AAA05703 for cvs-sys-outgoing; Fri, 19 Apr 1996 00:07:44 -0700 (PDT) Received: from tfs.com (tfs.com [140.145.250.1]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id AAA05698 Fri, 19 Apr 1996 00:07:42 -0700 (PDT) Received: from critter.tfs.com by tfs.com (smail3.1.28.1) with SMTP id m0uAAHq-0003xPC; Fri, 19 Apr 96 00:07 PDT Received: from localhost.tfs.com (localhost.tfs.com [127.0.0.1]) by critter.tfs.com (8.6.12/8.6.12) with SMTP id FAA29340; Fri, 19 Apr 1996 05:56:44 GMT X-Authentication-Warning: critter.tfs.com: Host localhost.tfs.com didn't use HELO protocol To: davidg@Root.COM cc: Poul-Henning Kamp , 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 In-reply-to: Your message of "Thu, 18 Apr 1996 18:26:18 MST." <199604190126.SAA08890@Root.COM> Date: Fri, 19 Apr 1996 05:56:44 +0000 Message-ID: <29338.829893404@critter.tfs.com> From: Poul-Henning Kamp Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > >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.