cvs commit: src/sys/sys tls.h src/lib/libc/gen tls.c src/lib/libthread_xu/arch/amd64/amd64 pthread_md.c src/lib/libthread_xu/arch/i386/i386 pthread_md.c src/libexec/rtld-elf rtld.c rtld.h rtld_tls.h src/libexec/rtld-elf/i386 reloc.c

Joerg Sonnenberger joerg at britannica.bec.de
Mon Mar 28 09:35:00 PST 2005


On Mon, Mar 28, 2005 at 07:23:21PM +0200, Joerg Sonnenberger wrote:
> On Mon, Mar 28, 2005 at 09:15:28AM -0800, Matthew Dillon wrote:
> > :I'd like to get rid of the size argument too. This should be split into
> > :machine/tls.h (with e.g. the struct tcb define) and sys/tls.h with the
> > :general system call.
> > 
> >     This is viable, but I think it might be best to retool it so the thread
> >     library has full control over the size of the TCB rather then hardwire
> >     it into the OS headers.
> 
> There is _no_ reason for the thread library to extend the TCB.
> Anything which a thread library might want to store there can also be
> stored in the pthread structure, which is completely managed by the
> library. There are still differences between architectures in what
> to place in the TCB, because the "self" pointer is only needed for
> segment-style implementations, if the TCB register contains a normal
> pointer (like e.g. on IA64 or any RISC architecture), it is not
> needed.

I should add that I mean the following tcb layout:
struct tls_tcb {
#ifdef INDIRECT_THREAD_REGISTER
	struct tls_tcb *tcb_base;
#endif
	void *dtv_base;
	void *tcb_pthread;
}

Joerg





More information about the Commits mailing list