Re: threads stuff/UnixWare

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: threads stuff/UnixWare
Date: 2004-05-12 20:25:51
Message-ID: D81F3B6E4F60264DE3736D90@lerlaptop.lerctr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

--On Wednesday, May 12, 2004 16:22:58 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:

> Larry Rosenman <ler(at)lerctr(dot)org> writes:
>> I was thinking of pq_pthread_* calls, and that function would
>> set a static flag for calling either the real pthread_* function
>> or a statically named version in libpgport.a that is a single thread
>> wrapper.
>
> And how will you avoid having a link-time dependency on the real pthread
> function? You muttered about dlsym but how much code will that take,
> and what kind of runtime penalty will we incur? (IIRC the pthread
> functions are performance critical.)
The first call to ANY of the pthread_* functions would set the flag, and
would cache the dlsym() info.

>
> Even more to the point, can you make it work at all? I seem to recall
> from the prior discussion that -Kpthread actually changes some code
> generation details on that platform. Are -Kpthread and non -Kpthread
> libraries interoperable at all?
Yes, this is how libc deals with it.

We wouldn't have a hard symbol for the pthread_* calls.

I can ask the compiler guys at SCO if you want.

>
>> I know, this sucks, but, I don't see any other way, other than linking
>> *ALL* libpq-using programs (including initdb and friends) with -K
>> pthread.
>
> -Kpthread doesn't sound that bad to me, as long as it's documented.
>
> regards, tom lane

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2004-05-12 20:29:30 Re: threads stuff/UnixWare
Previous Message Tom Lane 2004-05-12 20:22:58 Re: threads stuff/UnixWare