[PATCH] Run thread shutdown functions in an explicit order

Florian Weimer fweimer@redhat.com
Mon Jun 25 17:52:00 GMT 2018


On 06/25/2018 07:37 PM, Carlos O'Donell wrote:

>> -text_set_element (__libc_subfreeres, res_thread_freeres);
>> +text_set_element (__libc_subfreeres, __res_thread_freeres);
> 
> Until we kill __libc_subfreeres, this function should use the libc_freeres_fn() macro for now.

libc_freeres_fn defines the function as static, so it does not work here.

>>   /* Deallocate the global data.  */
>> -static void __attribute__ ((section ("__libc_thread_freeres_fn")))
>> +static void
> 
> OK. Was this function in the wrong section? This section placement doesn't
> really matter, it's just an optimization for hot/cold icache.

I made a copy-paste error when I added it.

>>   freeres (void)
>>   {
>>     /* No locking because this function is supposed to be called when
> 
> Until we kill __libc_subfreeres, this function should use the libc_freeres_fn() macro for now.

I could use libc_freefres_fn for this one, that's right.  New patch 
attached.

Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thread-freeres.patch
Type: text/x-patch
Size: 9755 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20180625/9fead728/attachment.bin>


More information about the Libc-alpha mailing list