Date: Tue, 5 Aug 2003 18:06:38 -0400 (EDT) From: Daniel Eischen <eischen@vigrid.com> To: Marcel Moolenaar <marcel@xcllnt.net> Cc: Julian Elischer <julian@elischer.org> Subject: Re: Good news: KSE on ia64 is starting to work Message-ID: <Pine.GSO.4.10.10308051805100.18508-100000@pcnet5.pcnet.com> In-Reply-To: <20030805214923.GA1633@dhcp01.pn.xcllnt.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 5 Aug 2003, Marcel Moolenaar wrote:
> On Tue, Aug 05, 2003 at 02:16:55PM -0700, Julian Elischer wrote:
> >
> > > BTW: Feel free to commit your patch at your earliest convenience
> > > (with or without the change described above). I see a slight
> > > regression after applying the patch, but much rather see it
> > > committed than having to work with a large patch...
> >
> > you mean a 'speed' regression?
>
> A functional regression. There's a bug in _tcb_set() The tcb
> argument can be NULL and we unconditionally dereference it.
> Hence, kse_sched_multi() now causes segfaults. It did not do
> that before :-)
Yup, you're right. I think you want something like this:
static __inline void
_tcb_set(struct kcb *kcb, struct tcb *tcb)
{
if (tcb == NULL {
kcb->kcb_curtcb = &kcb->kcb_faketcb;
_tp = &kcb->kcb_faketcb.tcb_tp;
}
else {
kcb->kcb_curtcb = tcb;
tcb->tcb_curkcb = kcb;
_tp = &tcb->tcb_tp;
}
}
>
> Something else is still fishy though:
>
> itanium% ./kse
> Using 5 threads (default)
> bar 0
> Segmentation fault (core dumped)
>
> It should be something like:
>
> itanium% ./thr
> Using 5 threads (default)
> bar 1
> bar 2
> bar 3
> bar 0
> bar 4
>
> The bar # lines are randomized, so the order does not have to be
> the same. But, I'm almost there...
Great, let me know what you find.
--
Dan Eischen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10308051805100.18508-100000>
