diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 9c514b14855..3b4e0286b73 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2007-10-10 Jason Merrill + + * libsupc++/guard.cc (struct mutex_wrapper): Move into + anonymous namespace. + 2007-10-10 Paolo Carlini * include/debug/list (list<>::list(list&&)): Fix. diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc index dca37f1f26a..6cf83b1c1f4 100644 --- a/libstdc++-v3/libsupc++/guard.cc +++ b/libstdc++-v3/libsupc++/guard.cc @@ -60,6 +60,20 @@ namespace __gthread_once(&once, init); return *static_mutex; } + + // Simple wrapper for exception safety. + struct mutex_wrapper + { + bool unlock; + mutex_wrapper() : unlock(true) + { get_static_mutex().lock(); } + + ~mutex_wrapper() + { + if (unlock) + static_mutex->unlock(); + } + }; } #ifdef __GTHREAD_HAS_COND @@ -199,22 +213,6 @@ namespace __cxxabiv1 return 1; } - // Simple wrapper for exception safety. - struct mutex_wrapper - { -#ifdef __GTHREADS - bool unlock; - mutex_wrapper() : unlock(true) - { get_static_mutex().lock(); } - - ~mutex_wrapper() - { - if (unlock) - static_mutex->unlock(); - } -#endif - }; - extern "C" int __cxa_guard_acquire (__guard *g) {