Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Date
Msg-id Pine.LNX.4.44.0309012337450.1206-100000@peter.localdomain
Whole thread Raw
In response to Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: massive quotes?
Next
From: Tommi Mäkitalo
Date:
Subject: Re: TCP/IP with 7.4 beta2 broken?