Good news: KSE on ia64 is starting to work
Daniel Eischen
eischen at vigrid.com
Tue Aug 5 15:06:45 PDT 2003
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
More information about the freebsd-threads
mailing list