This is the mail archive of the libc-alpha@sourceware.org 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 2/9] Add the low level infrastructure for pthreads lock elision with TSX


On 05/15/2013 02:34 PM, Andi Kleen wrote:
>>
>> This code is run from elision_init which is in .init_array or .preinit_array.
>>
>> You should have all the functionality of the C library by that point?
> 
> pthread has some magic that makes it run early.

libpthread.so runs __pthread_initialize_minimal early...

>>
>> Don't C++ static constructors are run from these?
>>
>> What problems did you have localizing this?
> 
> I didn't try to localize this, but I had lots of problems with 
> other services earlier (e.g. simple getenv does not work)

... and you can't call getenv from __pthread_initialize_minimal
because the library hasn't been setup enough for this to work.
Siddhesh fixed this for his work on setting the default thread
stack size from an environment variable.

So unless you are hooking into __pthread_initialize_minimal there
should be no problems.

Everything in the library should be localized unless we have a 
good reason not to including that the services aren't available
to us at the point at which our code runs.

Cheers,
Carlos.


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