[PATCH v13 3/6] Add Linux 'extra TLS'

Michael Jeanson mjeanson@efficios.com
Tue Nov 19 20:25:44 GMT 2024


On 2024-11-19 15:07, Mathieu Desnoyers wrote:
>> +/* Returns the size of the extra TLS block.  */
>> +static inline size_t
>> +_dl_extra_tls_get_size (void)
>> +{
>> +  bool do_rseq = true;
>> +  do_rseq = TUNABLE_GET_FULL (glibc, pthread, rseq, int, NULL);
> 
> I'm no glibc coding style expert, but I'm not sure why we end up with
> this code layout ? Perhaps consider the alternative:
> 
>   bool do_rseq = TUNABLE_GET_FULL (glibc, pthread, rseq, int, NULL);
> [newline]
>   if (do_rseq)

This is the structure of the current code in 'sysdeps/nptl/dl-tls_init_tp.c',
I only reused it here.

>> +/* Returns the alignment requirements of the extra TLS block.  */
>> +static inline size_t
>> +_dl_extra_tls_get_align (void)
>> +{
>> +  bool do_rseq = true;
>> +  do_rseq = TUNABLE_GET_FULL (glibc, pthread, rseq, int, NULL);
> 
> same question as above.

Same.



More information about the Libc-alpha mailing list