From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,e0cdd9a132483603 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-11-20 08:30:31 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!elnk-pas-nf1!elnk-nf2-pas!newsfeed.earthlink.net!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!attbi_s54.POSTED!not-for-mail From: Jerry Feldman Newsgroups: comp.unix.tru64 Subject: Re: Thread safe malloc in Tru64? Message-ID: <20031120113030.7dd366ed.gaf-noSPAM@blu.org> References: Organization: Boston Linux and Unix X-Newsreader: Sylpheed version 0.9.6claws (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.34.95.253 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s54 1069345830 24.34.95.253 (Thu, 20 Nov 2003 16:30:30 GMT) NNTP-Posting-Date: Thu, 20 Nov 2003 16:30:30 GMT Date: Thu, 20 Nov 2003 16:30:31 GMT Xref: archiver1.google.com comp.unix.tru64:10953 On Thu, 20 Nov 2003 16:11:01 +0200 "Ioannis E. Venetis" wrote: > Hello, > > I am trying to create a library that will run, among other > architectures, on Tru64/Alpha systems. > Of course, this library has a machine independant (the same for all > architectures) and a machine > dependant part. For some reasons, I chose to use the > thread_create/thread_get_state/ > thread_set_state/thread_resume/thread_terminate interface in the > machine dependant part of the > library to manage kernel-level threads on Tru64 Unix systems. I am > mentioning it in case this has > something to do with the problem I will describe. While I am not purporting to solve your problem, but all libc functions, including malloc(3), were made threadsafe (I believe) as of Tru64 (Digital Unix) 4.0. When compiling use -pthread rather than -lpthread or -lpthreads. Additionally, libc_r is nothing more than a symlink to libc. Also be aware that the Tru64 thread package uses a combination of kernel threads and user threads. Try using HP's native compiler for your testing. Part of your problem might be that gcc 2.95 is out of date. -- Jerry Feldman Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9