Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)

Поиск
Список
Период
Сортировка
От Lee Kindness
Тема Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Дата
Msg-id 16212.20497.397807.832014@kelvin.csl.co.uk
обсуждение исходный текст
Ответ на Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)  (Lee Kindness <lkindness@csl.co.uk>)
Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Tom Lane writes:> Greg Stark <gsstark@mit.edu> writes:> > On the other hand, things like, getpwnam, strtok, etc have
non-thread-safe>> APIs. They can never be made thread-safe. The *_r versions of these functions> > are standardized and
required.If they don't exist then the platform simply> > does not support threads.> > This statement is simply false.
Aplatform can build thread-safe> versions of those "unsafe" APIs if it makes the return values point> to thread-local
storage. Some BSDs do it that way.  Accordingly, any> simplistic "we must have _r to be thread-safe" approach is>
incorrect.

No, it's not. Using the _r functions on such systems is BETTER because
the API is clean and the function can be implmented in a reentrant and
thread-safe fashion wuithout the need for thread local storage or
mutex locking.

L.


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

Предыдущее
От: Tommi Maekitalo
Дата:
Сообщение: Re: TCP/IP with 7.4 beta2 broken?
Следующее
От: Weiping He
Дата:
Сообщение: configure error in HP-UX 11.00