From owner-freebsd-alpha Thu Feb 7 16:22:45 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from net2.gendyn.com (nat2.gendyn.com [204.60.171.12]) by hub.freebsd.org (Postfix) with ESMTP id A8ADD37B41C for ; Thu, 7 Feb 2002 16:22:37 -0800 (PST) Received: from [153.11.11.3] (helo=plunger.gdeb.com) by net2.gendyn.com with esmtp (Exim 2.12 #1) id 16Yyo9-000M3Q-00 for alpha@FreeBSD.org; Thu, 7 Feb 2002 19:22:29 -0500 Received: from clcrtr.gdeb.com ([153.11.109.11]) by plunger.gdeb.com with SMTP id TAA11556; Thu, 7 Feb 2002 19:19:05 -0500 (EST) Received: from vigrid.com (gpz.clc.gdeb.com [192.168.3.12]) by clcrtr.gdeb.com (8.11.4/8.11.4) with ESMTP id g180YcK58267; Thu, 7 Feb 2002 19:34:46 -0500 (EST) (envelope-from eischen@vigrid.com) Message-ID: <3C631A1B.68E59BFE@vigrid.com> Date: Thu, 07 Feb 2002 19:21:47 -0500 From: Daniel Eischen X-Mailer: Mozilla 4.78 [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: alpha@FreeBSD.org Cc: Bernd Walter Subject: Tester needed Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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; Thanks, -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message