Thread Local Storage
Doug Rabson
dfr at nlsystems.com
Mon Mar 29 13:16:29 PST 2004
On Monday 29 March 2004 20:39, Marcel Moolenaar wrote:
> On Mon, Mar 29, 2004 at 08:00:13PM +0100, Doug Rabson wrote:
> > I've also been looking at libpthread and I can see some potential
> > problems with it. Currently libpthread on i386 uses %gs to point at
> > a struct kcb which seems to be a per-kse structure. This structure
> > contains a pointer to a per-thread struct tcb and this pointer is
> > managed by the userland context switch code. Other arches are
> > similar, e.g. ia64 uses $tp to point at struct kcb.
>
> On ia64, TP points to struct ia64_tp, which is the TLS.
Yes, I saw that. I had the mistaken impression that this was contained
in the kcb but now I look at it again, it all seems fine. My real
problems were with the i386 though.
More information about the freebsd-threads
mailing list