[PATCH v3 1/3] Tunables: Add tunables of spin count for pthread adaptive spin mutex
kemi
kemi.wang@intel.com
Fri Jun 8 08:02:00 GMT 2018
On 2018å¹´06æ07æ¥ 21:09, Florian Weimer wrote:
> On 05/23/2018 11:22 AM, Kemi Wang wrote:
>> +#ifdef SHARED
>> +# define INIT_SECTION ".init_array"
>> +#else
>> +# define INIT_SECTION ".preinit_array"
>> +#endif
>> +
>> +void (*const __pthread_mutex_tunables_init_array []) (int, char **, char **)
>> +Â __attribute__ ((section (INIT_SECTION), aligned (sizeof (void *)))) =
>> +{
>> +Â &mutex_tunables_init
>> +};
>
>
> Did you try to get rid of this?
>
I remembered you suggested me to put this initialization as part of pthread initialization.
https://sourceware.org/ml/libc-alpha/2018-05/msg00289.html
But, mutex_tunables_init need three parameters such as argc, argv, and env from libc_start_main,
while the pthread initialization function __pthread_initialize_minimal does not include any parameter.
I don't think we can simply put it as part of overall thread initialization unless we change the API
of __pthread_initialize_minimal.
Maybe you have better idea.
> Thanks,
> Florian
More information about the Libc-alpha
mailing list