TIA
Adv
> In a gnu/linux environment, the libmylib.so itself is thread safe, if I keep
> one lib handle opened via dlopen() globally visible to all thread without
> pthread_mutex protection, will dlsym() for geting function address and
> making the call cause any problem?
IMOH, this question is not related to the fact that your libmylib.so
is thread safe (although this feature might be highly desirable when
linking to a MT process), nor to the dynamic linking loader operations
dlopen(), dlsym()...
I believe, you can re-formulate your question as follows:
"If I have a variable shared by all threads without any pthread_mutex
protection, will a read access to this variable cause any problem?".
So I guess, that's merely a "standard question" on multi-threading...
> how about elf's autoloading when app's start up?
Do you mean, the dynamic libraries associated to a program that are
loaded when the program is executed? I believe, there is no issue
here, since all the libs needed are loaded at start-up, long before
any threads get created.
Does it answer your questions?
Regards,
Loic.