Date: Thu, 7 Oct 2004 09:13:57 -0400 From: Ken Smith <kensmith@cse.Buffalo.EDU> To: Andrew Belashov <bel@orel.ru> Cc: freebsd-threads@freebsd.org Subject: Re: Bug in kse_switchin()? Message-ID: <20041007131357.GA17153@electra.cse.Buffalo.EDU> In-Reply-To: <4164E87E.2080705@orel.ru> References: <Pine.GSO.4.43.0409220743460.857-100000@sea.ntplx.net> <41518130.3000704@orel.ru> <4152A383.3090901@orel.ru> <20041006031406.GB26037@electra.cse.Buffalo.EDU> <4164E87E.2080705@orel.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 07, 2004 at 10:55:58AM +0400, Andrew Belashov wrote: > Option -O does not solve a problem. > > But I have magic patch. It work with -O and -O2 options. Thanks for testing. I'm not sure what I'll do about the -O stuff yet. Given it seems to solve one problem that other people I respect couldn't explain I'll probably revert to -O for the 5.3-RELEASE and do some more testing to see how widespread a problem it is. > --- sys/sparc64/sparc64/machdep.c.orig Thu Aug 5 09:42:40 2004 > +++ sys/sparc64/sparc64/machdep.c Tue Sep 28 15:11:08 2004 > @@ -623,6 +623,11 @@ set_mcontext(struct thread *td, const mc > tf = td->td_frame; > pcb = td->td_pcb; > wstate = tf->tf_wstate; > + /* XXXKSE Make sure the windows are spilled. > + * This is needed for kse_switchin(2) for correct switching between > + * threads stacks. > + */ > + flushw(); > bcopy(mc, tf, sizeof(*tf)); > tf->tf_wstate = wstate; > if ((mc->mc_fprs & FPRS_FEF) != 0) { And thank you very much for that! I'm testing it now, and will commit it if nothing unexpected happens. -- Ken Smith - From there to here, from here to | kensmith@cse.buffalo.edu there, funny things are everywhere. | - Theodore Geisel |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041007131357.GA17153>