atomic.cc: Correct guards to match mutex.cc.

2008-12-12  Benjamin Kosnik  <bkoz@redhat.com>

	* src/atomic.cc: Correct guards to match mutex.cc.

From-SVN: r142735
This commit is contained in:
Benjamin Kosnik 2008-12-13 00:40:06 +00:00 committed by Benjamin Kosnik
parent d9db9855de
commit b0c2c850bd
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2008-12-12 Benjamin Kosnik <bkoz@redhat.com>
* src/atomic.cc: Correct guards to match mutex.cc.
2008-12-11 Benjamin Kosnik <bkoz@redhat.com>
Richard Henderson <rth@redhat.com>

View File

@ -36,7 +36,7 @@
namespace
{
#ifdef _GLIBCXX_HAS_GTHREADS
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
std::mutex atomic_mutex;
#endif
@ -56,7 +56,7 @@ namespace std
bool
atomic_flag::test_and_set(memory_order) volatile
{
#ifdef _GLIBCXX_HAS_GTHREADS
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
lock_guard<mutex> __lock(atomic_mutex);
#endif
bool result = _M_i;
@ -67,7 +67,7 @@ namespace std
void
atomic_flag::clear(memory_order) volatile
{
#ifdef _GLIBCXX_HAS_GTHREADS
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
lock_guard<mutex> __lock(atomic_mutex);
#endif
_M_i = false;