From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,7971b9ebdbe2369 X-Google-Attributes: gidfee84,public From: neideck@nestvx.enet.dec.com (Burkhard Neidecker-Lutz) Subject: Re: Problem with Posix thread library Date: 1996/05/22 Message-ID: <4nus8f$6l1@usenet.pa.dec.com>#1/1 X-Deja-AN: 156070410 references: <4nt7ij$jdh@news.camosun.bc.ca> organization: CEC Karlsruhe newsgroups: comp.unix.osf.osf1 In article <4nt7ij$jdh@news.camosun.bc.ca> dbarker@camosun.bc.ca (Deryk Barker) writes: >Has anyone had any luck getting the pthreads library to run under >Digital Unix on an Alpha? Yes... >I have a brief test program (culled from the Sun Solaris man page >example) which works just fine on a SPARC under Solaris 2.5 but gets a >segmentation fault on the Alpha. You probably didn't compile it correctly. Try: c89 -threads threadexample.c -o threadexample Manually specifying the libraries is tricky and likely gives you the wrong versions of some of the headers and libraries. For details add a "-v" to the C compiler flags to see what it really does. % uname -a OSF1 glass.kar.dec.com V3.2 41 alpha % c89 -threads threadexample.c -o threadexample % ./threadexample thread 293912 sleeping 2 seconds ... thread 291864 sleeping 4 seconds ... thread 290840 sleeping 5 seconds ... thread 292888 sleeping 3 seconds ... thread 289816 sleeping 6 seconds ... thread 293912 awakening thread 291864 awakening thread 292888 awakening thread 290840 awakening thread 289816 awakening main() reporting that all 5 threads have terminated Burkhard Neidecker-Lutz EUROMEDIA - Distributed Multimedia Archives for Cooperative TV Production CEC Karlsruhe , European Applied Research Center, Digital Equip. Corp. email: neideck@kar.dec.com "May 96: 4xAlphaServer 8400 5/350, Unix TruCluster, Oracle: 30,390 tpmC@$305"