[v3] c++0x <mutex> and <condition_variable>

Chris Fairles chris.fairles@gmail.com
Wed Sep 3 15:12:00 GMT 2008


On Wed, Sep 3, 2008 at 11:01 AM, Chris Fairles <chris.fairles@gmail.com> wrote:
> On Tue, Sep 2, 2008 at 6:27 PM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
>> Chris Fairles wrote:
>>>
>>> OK, so, all testcases need require-cstdint.
>>>
>>
>> Ok.
>>>
>>> I can change this check:
>>> #ifdef _GLIBCXX_HAS_GTHREADS
>>> to
>>> #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
>>> in the headers.
>>>
>>
>> Ok.
>>>
>>> As for _GTHREAD_HAS_COND, since its basically a subset of
>>> _GLIBCXX_HAS_GTHREADS, is there any point checking for it in
>>> <condition_variable>? Thus far I've been assuming that a platform
>>> either provides the entire gthread backend for all c++0x thread
>>> library requirements or it simply doesn't get to use the library so an
>>> all-or-nothing _GLIBCXX_HAS_GTHREADS (along with a
>>> dg-requires-gthreads for testcases) seems sufficient.
>>>
>>> End of the day, there should never be a case where
>>> _GLIBCXX_HAS_GTHREADS is defined but not _GTHREAD_HAS_COND.
>>>
>>
>> Good. One less macro contortion... ;)
>>
>> Paolo.
>>
>
> Updated patches attached.
>
> Chris
>

Small fix (header include tests using -std=c++98 don't "dg-require"
cstdint or gthreads).

Chris
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mutex_cond_var_patch.txt
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20080903/eb34c5e5/attachment.txt>


More information about the Libstdc++ mailing list