Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Peter Eisentraut <peter_e@gmx.net>
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Greg Stark <gsstark@mit.edu>, Bruce Momjian <pgman@candle.pha.pa.us>, <pgsql-hackers@postgresql.org>
Date: 2003-09-01T21:45:46Z
Lists: 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