Subj : Re: help with basic multithreading in C on solaris To : comp.programming.threads From : roger.faulkner Date : Sat Feb 26 2005 02:19 pm Winbatch wrote: > wrote in message > news:1109437559.309802.280640@z14g2000cwz.googlegroups.com... > > > > What release of Solaris are you using? > > If Solaris 7 or less, you are using the old libthread. > > If Solaris 8, you are using the old libthread by default > > but the alternate libthread is available for use (which > > is the same as the only libthread in Solaris 9). > > You cannot be using Solaris 9 or 10 because what you > > report would not happen on these releases. > > > > If you create your threads with the PTHREAD_SCOPE_SYSTEM > > attribute (see the pthread_attr_setscope() man page), > > then you will get the behavior you want. > > > > Sorry for the non-obvious behavior of the old libthread. > > > I'm on solaris 8, using verison 7 of the forte compiler. Can you give me > some more info on how to use the alternative libthread on solaris 8? Basically, link with /usr/lib/lwp/libthread.so.1 (or /usr/lib/lwp/sparcv9/libthread.so.1 if doing 64-bit stuff). For complete details see the Solaris 8 threads(3THR) man page, under the ALTERNATE IMPLEMENTATION section. In Solaris 9, the alternate libthread became the only libthread and the old two-level threads implementation was abandoned. Roger Faulkner Sun Microsystems .