|
From: Kristian V. D. V. <va...@li...> - 2008-10-26 12:48:02
|
On Sun, 2008-10-26 at 04:16 +0100, Stefano D'Angelo wrote: > 2008/10/24 Kristian Van Der Vliet <va...@li...>: > > On Fri, 2008-10-24 at 13:31 +0100, Kristian Van Der Vliet wrote: > >> I'll fix it in CVS later and email you a new libpthread if you like? > > I will investigate on the remaining failures, in the meanwhile I > noticed a couple of things: > > - there seems to be no ldd script in Syllable - is this intentional? Yes. The ldd script that is part of binutils uses ld.so, which we do not have. Use readelf -d instead and look at the NEEDED items. The output isn't as clear as ldd but shared libraries on Syllable rarely have complex dependency trees. > - the library you gave is name libpthread.so.2 while > /system/libraries/libpthread.so linked to > /system/libraries/libpthread.so.1 (using Syllable 0.6.5) - I guess > this implies that my stuff will only work with Syllable >= 0.6.6? Yes, but we do ship an ABI compatible libpthread.so.1 and I could & should apply the same fix there. > One of the two remaining problems goes like this: > > * the main thread allocates a mutex (ok) > * another thread locks it (ok) > * the same thread which locked it tries to unlock it, but > pthread_mutex_unlock() returns EPERM > > The mutex type is PTHREAD_MUTEX_ERRCHECK and it seems to always work > this way. Thanks, I'll look into it. Does it make any difference if the mutex is not MUTEX_ERRCHECK? > The last problem is a fault of mine... however I noticed that dlsym() > sets errno to 131 when not finding some symbol (using strerror I get > "Unknown error - 131", but I see it is ENOSYM in errno.h), which is > probably fine since the POSIX standard doesn't seem to even mention > errno is the dlsym page... however, in case you are interested in > that, all other OSes I tried probably don't let dlsym set errno > (Windows/MSYS, Linux, BSDs), while the AIX man page for dlsym states: > > "If the named symbol is found, its address is returned. If the named > symbol is not found, NULL is returned and errno is set to 0." Hmm, that's what it should be doing, but libdl does use the native call get_symbol_address() which *may* set errno. libdl itself doesn't touch errno, so it wont clear errno to zero if get_symbol_address() fails. -- Vanders http://www.syllable.org |