Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Mar 2002 07:36:32 -0500 (EST)
From:      Daniel Eischen <eischen@pcnet1.pcnet.com>
To:        Bernd Walter <ticso@cicely8.cicely.de>
Cc:        Daniel Eischen <eischen@vigrid.com>, alpha@FreeBSD.ORG
Subject:   Re: Tester needed
Message-ID:  <Pine.GSO.4.10.10203110734110.5025-100000@pcnet1.pcnet.com>
In-Reply-To: <20020311115217.GI4295@cicely8.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 11 Mar 2002, Bernd Walter wrote:
> On Thu, Feb 07, 2002 at 07:21:47PM -0500, Daniel Eischen wrote:
> > I want to add the getsetcontext system call and am looking for an
> > alpha tester to see if the code works.  Diffs and a test program
> > are at:
> > 
> >   http://people.freebsd.org/~deischen/ucontext/uc-sys.diffs
> >   http://people.freebsd.org/~deischen/ucontext/uc-libc.diffs
> >   http://people.freebsd.org/~deischen/ucontext/test_context.c
> > 
> > Don't forget to regenerate the system calls before building
> > a kernel.
> > 
> > I've also got a question.  Is the user stack stored in the PCB
> > or does it have to be read from the PAL?  If 'td' is the current
> > thread, then how do we get and set the user stack?
> > From uc-sys.diffs:
> > 
> >   +void
> >   +get_mcontext(struct thread *td, mcontext_t *mcp)
> >   +{
> >   +
> >   +	/*
> >   +	 * Use a trapframe for getsetcontext, so just copy the
> >   +	 * threads trapframe.
> >   +	 *
> >   +	 * XXX - Is there something that is missing from the saved
> >   +	 *       trapframe?  Like the stack pointer?
> >   +	 */
> >   +	bcopy(&td->td_frame, &mcp->mc_regs, sizeof(td->td_frame));
> >   +#if 1
> >   +	mcp->mc_regs[FRAME_SP] = alpha_pal_rdusp();
> >   +#else
> >   +	mcp->mc_regs[FRAME_SP] = td->td_pcb->pcb_hw.apcb_usp;
> >   +#endif
> >   [...]
> > 
> > And what if 'td' is not 'curthread'?  Has it been saved in the
> > PCB then?  Should the above be:
> > 
> >   +	if (td == curthread)
> >   +		mcp->mc_regs[FRAME_SP] = alpha_pal_rdusp();
> >   +	else
> >   +		mcp->mc_regs[FRAME_SP] = td->td_pcb->pcb_hw.apcb_usp;
> 
> This one is old, but unreplied until now.
> Do you still need testers?

No, I'll have another patch soon that incorporates some comments from
bde.  I'll post that when I'm done.  I could use an answer to the
user stack question above though.

-- 
Dan Eischen


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




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