From: William E. Kempf (wekempf_at_[hidden])
Date: 2003-06-03 12:16:01
Alexander Terekhov said:
> "William E. Kempf" wrote:
>> Not specifying the exact width
>> of various types is not really something that I think most people
>> would classify as "brain damaged."
> That's not the only problem with MS-interlocked API. For example, for
> DCSI and DCCI things, all you need is "hoist-load" and "sink-store"
> barriers; a "full" acquire/release is an overkill, so to speak. Also,
> for "basic" thread-safe reference counting, you really want to have
> "naked" increments and either "naked" decrements [for the immutable
> stuff] or decrements with "acquire-if-min"/"release-if-not-min"
> memory synchronization semantics.
I'd agree with that, but that's not what you said in the thread to defend
the "brain damaged" remark. Further, even this wouldn't classify it as
"brain damaged" to me, because what they give can be used correctly and
successfully for some use cases. "Brain damaged" implies it can't be used
at all. It's too derogatory to be used for anything less, and you throw
the term around very frequently.
>> Now, can you provide documentation for the above, including
>> preconditions, postconditions, etc. for each method?
> Do you mean refcount<>'s methods? atomic<> stuff? refs<>-thing?
All of it.
> A "man-pages"-like specification for plain C version of optionally
> non-blocking pthread_refcount_t without parameterization (I mean
> thread-safety and counter type) can be found here:
Thanks. I'll take a look at it.
-- William E. Kempf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk