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

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Дата
Msg-id Pine.LNX.4.44.0309012337450.1206-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane writes:

> This statement is simply false.  A platform 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.

That's the difference between being thread-safe and being reentrant.
Reentrancy is (usually) a property of the interface (hence *_r functions
with differing interfaces), thread-safety is a feature of the
implementation; both are orthogonal properties.  The Unix standards sort
of encourage making one dependent on the other, which might be where this
confusion comes from.

-- 
Peter Eisentraut   peter_e@gmx.net



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

Предыдущее
От: Andreas Pflug
Дата:
Сообщение: Re: massive quotes?
Следующее
От: Tommi Mäkitalo
Дата:
Сообщение: Re: TCP/IP with 7.4 beta2 broken?