From owner-cvs-all@FreeBSD.ORG Tue Apr 1 17:05:04 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4DBFD37B401; Tue, 1 Apr 2003 17:05:04 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 728CB43FB1; Tue, 1 Apr 2003 17:05:03 -0800 (PST) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h32152Bg020944; Tue, 1 Apr 2003 20:05:02 -0500 (EST) Received: from localhost (eischen@localhost)h3215255020941; Tue, 1 Apr 2003 20:05:02 -0500 (EST) Date: Tue, 1 Apr 2003 20:05:02 -0500 (EST) From: Daniel Eischen To: Jake Burkholder In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_context.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2003 01:05:04 -0000 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