From: Howard Hinnant (hinnant_at_[hidden])
Date: 2007-08-22 12:35:36
On Aug 22, 2007, at 10:42 AM, David Abrahams wrote:
> on Wed Aug 22 2007, Howard Hinnant <hinnant-AT-twcny.rr.com> wrote:
>>> "However if the external mutex is (or is layout compatible with) a
>>> pthread_mutex_t, then there is no need for the internal
>>> pthread_mutex_t. When one wants to wait, one simply waits on the
>>> external pthread_mutex_t with the internal pthread_cond_t."
>>> This smells a little fishy. It seems to imply that pthreads can
>>> on any old data type that happens to be layout-compatible with
>>> pthread_mutex_t. Is that really true?
>> Perhaps the wording isn't precise enough.
>> The intent is that on pthreads:
> <snip explanation that doesn't mention layout-compatibility>
> Sure. But where does the layout-compatibility thing come in? Your
> example uses the native pthread types, not arbitrary types
> layout-compatible with those.
The vendor will decide on which mutex types it is appropriate to make
this specialization/optimization. I used "layout-compatible" in an
attempt to communicate which std-defined mutex types would be
appropriate for the vendor to specialize on.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk