Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Mar 2002 12:52:17 +0100
From:      Bernd Walter <ticso@cicely8.cicely.de>
To:        Daniel Eischen <eischen@vigrid.com>
Cc:        alpha@FreeBSD.ORG
Subject:   Re: Tester needed
Message-ID:  <20020311115217.GI4295@cicely8.cicely.de>
In-Reply-To: <3C631A1B.68E59BFE@vigrid.com>
References:  <3C631A1B.68E59BFE@vigrid.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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?

-- 
B.Walter              COSMO-Project         http://www.cosmo-project.de
ticso@cicely.de         Usergroup           info@cosmo-project.de


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?20020311115217.GI4295>