Bug in kse_switchin()?
deischen at freebsd.org
Wed Sep 22 04:46:20 PDT 2004
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).
More information about the freebsd-threads