Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Apr 2003 20:05:02 -0500 (EST)
From:      Daniel Eischen <eischen@pcnet1.pcnet.com>
To:        Jake Burkholder <jake@locore.ca>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_context.c
Message-ID:  <Pine.GSO.4.10.10304012003570.20766-100000@pcnet1.pcnet.com>
In-Reply-To: <Pine.GSO.4.10.10304011955570.18787-100000@pcnet1.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 1 Apr 2003, Daniel Eischen wrote:

> On Tue, 1 Apr 2003, Jake Burkholder wrote:
> > Yes, I see what you mean.  The problem on sparc64 is that the arguments
> > setup in makecontext get clobbered.  They're passed in the same registers
> > as the return value for the system call, so when syscall copies td_retval
> > into the registers it clobbers the arguments that were set.  I can hack
> > around it by just copying the registers that would be clobbered into
> > td_retval if that would work better.  execve has the same problem, we
> > use the above hack there.
> 
> I think the changes you made are correct; swapcontext() and
> setcontext() now return EJUSTRETURN if there were no errors.
> But we just need to fix getcontext() so that it clears the

and swapcontext() too.

> return value registers in the mcontext.  This needs to be
> an option, though, because other uses of get_mcontext don't
> want that behaviour.
> 
> This would still work on sparc64, right?  Unless I am
> misunderstanding something.

-- 
Dan Eischen



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