forward.c and libc-lock.h, __pthread_mutex_X usage

Peter S. Mazinger ps.m at
Wed May 24 08:08:04 UTC 2006


I have reviewed the new linuxthreads version and I have doubts how the 
__pthread_mutex_X() should work (lock,unlock,trylock,init).


/*simplified forward.c*/

strong_alias(Z,__Z) where __Z is hidden (at least in

for ex.
__pthread_mutex_init in>(strong_alias, will this step work anytime?)->
(pthread.c)->depending on what we have in pthread.c either 
__pthread_mutex_init or pthread_mutex_init in

Now should the redirect end at the internal hidden __pthread_mutex_init or 
the visible pthread_mutex_init (pthread.c) or does it matter at all?

if files in were using libc-lock.h and would use __libc_*lock_*

/* simplified interpretation of libc-lock.h */
#if !defined NOT_IN_libc && defined SHARED /*all .oS in*/
/* the above could be adapted to apply by some other logic to uClibc, 
making it independent of SHARED */

Why is libc-lock.h not used generally, only for iirc rpc?
This is probably historical, so please Erik/Manuel?

Thanks, Peter

Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2

More information about the uClibc mailing list