[PATCH v4] nptl: Add <thread_pointer.h> for RISC-V

Michael Jeanson mjeanson@efficios.com
Wed Oct 23 19:30:21 GMT 2024


On 2024-10-18 03:15, Florian Weimer wrote:
> * Michael Jeanson:
> 
>> On 2024-10-17 22:58, Florian Weimer wrote:
>>> Sorry, I was confused.  We had some previous discussion about
>>> providing a <sys/thread_pointer.h> header, but we never got around
>>> installing it.  Installed headers are defined by listing them in the
>>> “headers” variable in Makefiles.
>>
>> If <sys/thread_pointer.h> is still a possibility I think it makes sense
>> to apply those constraints to our implementation of <thread_pointer.h>.
> 
> I think we might still want to expose <sys/thread_pointer.h> once we
> have broader architecture coverage.

Ack, I'll keep that in mind for the other architectures.

> 
>> Otherwise the global register variable seems like a cleaner implementation.
> 
> We could still use the global register variable approach for glibc
> itself.  The wrapper header in include/sys/thread_pointer.h could
> redirect things to other headers.  On the other hand, the global
> register variable approach will never be fully consistent across
> architectures because many just don't have this type of thread pointer
> register.

Ack, I'll go with inline assembly for the moment, anyway as you said most
of them will use the builtin with recent compilers.

So for RISC-V, this v4 would be it.


More information about the Libc-alpha mailing list