Tsutomu Enokida wrote:
Thank you for your reply.
I think from the following display of lwps command of dbx that when a
nonthreaded program,
which is thread-unsafe and linked with libpthread.so, calls my shared
library, four more threads
are created, and then main thread plus the four threads run at the same
time because my shared
library is compiled with the -D_POSIX_C_SOURCE flag and linked with
libpthread.so.
Do four threads except main thread cause problems for thread-unsafe
caller program?
Enokida
Ah... your library is not only thread-safe, it is thread hot in that
it creates threads and needs threads to work in order to function
correctly.
In Solaris 10 or better, this works even for thread unsafe applications
so long as you don't execute any application supplied callbacks in any
context besides the main thread.
For releases of Solaris prior to 10, this is not supported. In
particular, dlopenning libraries that are thread-hot from non-mt safe
programs is known not to work well.
- Bart
Bart Smaalders Solaris Kernel Performance
[EMAIL PROTECTED] http://blogs.sun.com/barts
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code