Thread Local Storage

Marcel Moolenaar marcel at xcllnt.net
Mon Mar 29 11:39:40 PST 2004


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.

-- 
 Marcel Moolenaar	  USPA: A-39004		 marcel at xcllnt.net


More information about the freebsd-threads mailing list