On 11/30/10 10:32 AM, Afantee Lee wrote:
Hi,
I am trying to replace the pthread library under Solaris with my own.
My plan is to modify the code from OpenSolaris (adding lots of profiling code),
and compile it as a dynamic lib. then, replace the one under Solaris with my
own.
the question is: will this replacement work ? (if I did not the pthread code
from Opensolaris at all)
The pthread functions are part of libc in recent Solaris releases.
If you want to roll your own, either interpose the functions you want to
dissect or use LD_PRELOAD to load your library ahead of libc. There's a
fair chance using LD_PRELOAD to interpose libc functions will end in tears.
--
Ian.
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org