Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Aug 2003 16:43:00 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        threads@freebsd.org
Subject:   Re: Good news: KSE on ia64 is starting to work
Message-ID:  <Pine.GSO.4.10.10308051639180.6128-100000@pcnet5.pcnet.com>
In-Reply-To: <20030805203213.GA879@athlon.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 04:12:01PM -0400, Daniel Eischen wrote:
> > On Tue, 5 Aug 2003, Marcel Moolenaar wrote:
> > 
> > > On Tue, Aug 05, 2003 at 02:02:04PM -0400, Daniel Eischen wrote:
> > > > > 
> > > > > The patch does not contain ia64 (yet), but libpthread.ia64.diffs
> > > > > does indeed have the code that deals with TP.
> > > > 
> > > > Oh shoot.  Terribly sorry :-(  I didn't change the link
> > > > to point to the latest patch file.  If you grab it again,
> > > > it should be updated.
> > > 
> > > Attached the diff again pthread_md.h (ia64) after my commits.
> > > Mostly merge conflict resolutions.
> > 
> > Got it, thanks :)
> 
> I got a fix:
> In struct ia64_tp we define tp_tls as an array of char. If we
> define it as an array of long double we automaticly have 16-byte
> alignment of the static TLS, struct ia64_tp, struct tcb and
> struct kcb. Allocating the TCB will then automaticly ensure that
> the static TLS is properly aligned. I'm currently testing with
> the following (re)definition of struct ia64_tp:
> 
> struct ia64_tp {
>         struct tdv              *tp_tdv;        /* dynamic TLS */
>         struct tcb              *tp_self;
>         long double             tp_tls[0];      /* static TLS */
> };

Sure; that was merely a placeholder so one (you) could replace
it with whatever is needed.  I assume this (static TLS) will
have some predetermined size...

> BTW: I'm also thinking about replacing tp_self by tp_thread and use
> the following to get to the TCB:
> 
> #define _CURTCB(tp) (struct tcb*)((uintptr_t)tp - offsetof(struct tcb, tcb_tp))
> 
> This should remove some double-indirections to get to struct pthread.
> I haven't made the change locally yet. I first want to get the
> show on the road.

Sure, that works for me as well.

-- 
Dan Eischen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10308051639180.6128-100000>