Re: libpq_r

Поиск
Список
Период
Сортировка
От Larry Rosenman
Тема Re: libpq_r
Дата
Msg-id 2980000.1059126476@lerlaptop.lerctr.org
обсуждение исходный текст
Ответ на Re: libpq_r  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers

--On Friday, July 25, 2003 11:51:50 +0200 Peter Eisentraut 
<peter_e@gmx.net> wrote:

> Larry Rosenman writes:
>
>> The -D_REENTRANT causes NO pain, and makes it possible to have ONE
>> library for UnixWare.
>
> Didn't you just say that -D_REENTRANT changes the definition of errno on
> your system?  Surely it would not be a good idea to link a libpq that uses
> variant 1 with a program that uses variant 2.  Maybe I'm wrong and you can
> do that, but it sounds problematic to me.
Yes, it DOES change errno, but it is **NOT** problematic.  the static int 
is there
ONLY FOR THE FIRST LWP (thread) of a process.  The reentrant version 
accesses the same
information for ANY LWP.  the first LWP can also use it for getting access.

It is SAFER to use the reentrant version, so that if a THREADED program 
uses libpq,
we are now thread-safe.

LER




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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: libpq_r
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: php with postgres