Date: Wed, 22 Sep 2004 07:46:17 -0400 (EDT) From: Daniel Eischen <deischen@freebsd.org> To: Andrew Belashov <bel@orel.ru> Cc: freebsd-threads@freebsd.org Subject: Re: Bug in kse_switchin()? Message-ID: <Pine.GSO.4.43.0409220743460.857-100000@sea.ntplx.net> In-Reply-To: <4151132E.8030904@orel.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.43.0409220743460.857-100000>