From owner-freebsd-threads@FreeBSD.ORG Wed Sep 22 11:46:20 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4675D16A4CE for ; Wed, 22 Sep 2004 11:46:20 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E444743D46 for ; Wed, 22 Sep 2004 11:46:19 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) i8MBkHKi000332; Wed, 22 Sep 2004 07:46:17 -0400 (EDT) Date: Wed, 22 Sep 2004 07:46:17 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Andrew Belashov In-Reply-To: <4151132E.8030904@orel.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: Julian Elischer cc: freebsd-threads@freebsd.org Subject: Re: Bug in kse_switchin()? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 11:46:20 -0000 On Wed, 22 Sep 2004, Andrew Belashov wrote: > Daniel Eischen wrote: > > On Tue, 21 Sep 2004, Julian Elischer wrote: > > > >>Andrew Belashov wrote: > >> > >> > >>>See sys/kern/kern_kse.c > >>> > >>>In line with "suword32(&uap->tmbx->tm_lwp, td->td_tid)" kernel > >>>not check return value (error state). This is correct? > >> > >> > >>yes and no. > >> > >>You are correct. > >>It is never correct to "not check" however we have just looked at that > >>location 7 lines earlier, so we know > >>that the page in question is loaded and valid. This is is "prbably safe". > >> > >>Probably we should look at the error value also, even if this is true. > > > > > > Julian, you missed an important question below. It looks > > like he's trying to get this working with sparc64 and the > > suword32 is generating an alignment exception. > > > > Is lwpid_t 64-bit on sparc64 or is it somehow not being aligned > > properly within the mailbox? > > lwpid_t on sparc64 is 32-bit (typedef __int32_t __lwpid_t). > > What about using copyout? Does it have to be 64-bit aligned in order to use suword32()? I believe you can use copyout, but perhaps the mailbox should be laid out so that fields are better aligned (doing this would break ABI). -- Dan Eischen