This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PPC linuxthreads tls.h fix


> I would like a multiple_threads field in the tcbhead_t in the TLS case
> for ppc32 as well, since it would make the check for multiple threads
> fast and easy.  I will talk to Alan about expanding the TCB to 16
> bytes on ppc32 to accommodate that.

That is not strictly necessary, even all else being unchanged.  The word
after the DTV is called "the TCB pointer" in the TLS spec, but is
effectively specified as opaque and private to the implementation as I
understand it.  We do not use this word for anything now (instead, our
private TCB data structure is located just prior to the word containing the
DTV, i.e. at a negative offset from the thread register), so it could be
stolen for that.  However, in a USE_TLS build it can always use negative
offsets to use the private descriptor instead.

> In the non-TLS case the tcbhead_t overlays the start of the
> _pthread_descr_struct, and pthread_handle_create will set the
> multiple_threads field for us.

I wonder if perhaps we should change this to have a consistent ABI for the
thread register and the data structure around it, between TLS and non-TLS
builds.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]