This is the mail archive of the libc-alpha@sources.redhat.com 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: [Dri-devel] Re: OpenGL and the LinuxThreads pthread_descr structure


>>>>> "Jakub" == Jakub Jelinek <jakub@redhat.com> writes:

>> How do you detect threading without making these calls to libpthreads.so?

Jakub> Weak symbols.

Jakub> extern pthread_t pthread_self (void) __attribute__ ((weak));

Jakub> (resp. #pragma weak pthread_self).
Jakub> Then if (&pthread_self) { application was linked against -lpthread } else { not threaded }
Jakub> Note all calls to pthread library has to be weak.

Hmm, if all the references to libpthread are weak, what will pull
libpthread in ?


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