Re: threads stuff/UnixWare - Mailing list pgsql-hackers

From Tom Lane
Subject Re: threads stuff/UnixWare
Date
Msg-id 28249.1084393378@sss.pgh.pa.us
Whole thread Raw
In response to Re: threads stuff/UnixWare  (Larry Rosenman <ler@lerctr.org>)
Responses Re: threads stuff/UnixWare
List pgsql-hackers
Larry Rosenman <ler@lerctr.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.)

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?

> 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


pgsql-hackers by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: threads stuff/UnixWare
Next
From: Larry Rosenman
Date:
Subject: Re: threads stuff/UnixWare