[cpp-threads] RE: C++ Connections proposal
Alexander Terekhov
alexander.terekhov at gmail.com
Tue Apr 26 00:15:53 BST 2005
On 4/25/05, Boehm, Hans <hans.boehm at hp.com> wrote:
[...]
> inlining the pthread primitives. You are just moving
> things down a level; the "opaque calls" are now the CAS
> instructions or the like.
Pthreads aside for a moment, think of refcounting under basic
thread safety -- stuff along the lines of std::string COWs and
tr1::shared_ptr/weak_ptr. You really don't want "opaque" (full-
stop compiler fence) atomics for increments (they can be
totally naked) or decrements (they need relaxed value
dependent acquire-release protocol [msync::cchlb -> msync::
cchsb] in the case of immutable managed objects instead of
"full" [but still value dependent] acquire-release protocol in the
case of mutable ones).
>
> I'm not sure how many systems actually have the option of
> inlining pthread primitives.
Pthreads-win32 can do it, IIRC. ;-)
regards,
alexander.
More information about the cpp-threads
mailing list