Bernd Schmidt wrote: > Carmelo Amoroso wrote: > >>> When libpthread is included in the link, __pthread_mutex_init will do >>> the initialization. So, what's going on? >>> >> likely you're right ... but this is not true for the nptl branch. >> I've almost completed to port a lot of changes from th trunk to the nptl >> branch >> (one of this changes are exactly on weaks pthread symbols) and I'll >> check again if this >> fix is still required (anyway, glibc has the memset as I added into the >> uclibc), >> but your point is correct. > > Thanks for the update. I don't really mind the change itself, but I > wanted to be sure it's not hiding a bug elsewhere. It would be bad if > NPTL used real locking for single-threaded, statically linked binaries. > > > Bernd
Hi Bernd, just an update. The problem was just the opposite. In NPTL multi-threaded, statically linked binaries, the locking functions were always empty stab (from weaks.o) instead of real ones from libpthread.a. After recent discussions with Chris Metcalf, I figured out a better fix to be done in NPTL to force linking real locking functions in MT applications. At this point the memset from opendir can be removed and reverted to the previous code: it was basically a work around. Anyway, before committing, I'd try to check what happens on trunk with linuxthreads too. Cheers, Carmelo _______________________________________________ uClibc mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/uclibc
