Date: Fri, 19 Apr 1996 08:15:01 +0000 From: Poul-Henning Kamp <phk@critter.tfs.com> To: Bruce Evans <bde@zeta.org.au> 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 Message-ID: <29592.829901701@critter.tfs.com> In-Reply-To: Your message of "Fri, 19 Apr 1996 17:34:09 %2B1000." <199604190734.RAA06655@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
> >> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?29592.829901701>