[681] in Pthreads mailing list archive
Re: ptheards on AIX 4.1
daemon@ATHENA.MIT.EDU (RHS Linux User)
Wed Jul 16 06:42:39 1997
Date: Tue, 15 Jul 1997 11:52:21 +0300
From: RHS Linux User <monty@monty.pp.sci.fi>
To: pthreads@MIT.EDU
In-Reply-To: <9707100235.AA11640@wham6.wham.com>
Reply-To: monty@analytikerna.se
>>>>> "Dave" == Dave McCracken <dmc@wham.com> writes:
Dave> Nick Godbey <Nick.Godbey@es.atl.sita.int> wrote:
>> Some weeks back I ask for help with getting ptheards to work with
>> AIX 4.1. I was using gcc 2.7.2. Well here is what I found. On AIX 4.1
>> there are two functions that must be called before main. The
>> IBM xlc compiler can be used for thread apps and non thread apps.
>> To us it for threaded apps xlc_r is soft linked to xlc. The argv[0]
>> arg is then used as a switch to tell xlc to insert these two
>> hidden function calls before main. gcc does not know how to do
>> this so it can't be used! This is a major problem as I don't have a
>> xlC_r(C++ version) and I need to use gcc.
Dave> What xlc_r really does is use crt0_r.o instead of crt0.o. There is
Dave> an xlC-specific crt0.o and crt0_r.o in the xlC tree, so if you don't
Dave> have it that would be a problem. All you'd need, though, is the
Dave> right crt0_r.o.
In MySQL I solved this by calling pthread_init() first in each application that
uses pthreads.
Monty