Bug in kse_switchin()?

Andrew Belashov bel at orel.ru
Tue Sep 21 22:52:55 PDT 2004

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?

With best regards,
Andrew Belashov.

More information about the freebsd-threads mailing list