From owner-cvs-sys Fri Apr 19 01:15:15 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id BAA07807 for cvs-sys-outgoing; Fri, 19 Apr 1996 01:15:15 -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 BAA07801 Fri, 19 Apr 1996 01:15:13 -0700 (PDT) Received: from critter.tfs.com by tfs.com (smail3.1.28.1) with SMTP id m0uABLP-0003ymC; Fri, 19 Apr 96 01:15 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 IAA29594; Fri, 19 Apr 1996 08:15:03 GMT X-Authentication-Warning: critter.tfs.com: Host localhost.tfs.com didn't use HELO protocol To: Bruce Evans cc: davidg@Root.COM, 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 In-reply-to: Your message of "Fri, 19 Apr 1996 17:34:09 +1000." <199604190734.RAA06655@godzilla.zeta.org.au> Date: Fri, 19 Apr 1996 08:15:01 +0000 Message-ID: <29592.829901701@critter.tfs.com> From: Poul-Henning Kamp Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > >> 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 :-)). > > savectx() returned via cpu_switch() for the child case of cpu_fork(), so > cpu_switch was expected to return both void and int :-). It actually > returned void, and the PCB_EAX initialization for the child case was > never used. I think the correct fix is to always return 1 or PCB_EAX(%edx) > in cpu_switch(). That is a pointless waste of time, since cpu_switch cannot "fail" there is no "return value" from it, so saving and reloading %eax is a waste of time. -- 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.