|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2007-08-22 10:42:52
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 wait
>> 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.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk