guard.cc (struct mutex_wrapper): Move into anonymous namespace.
authorJason Merrill <jason@redhat.com>
Wed, 10 Oct 2007 23:06:08 +0000 (19:06 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 10 Oct 2007 23:06:08 +0000 (19:06 -0400)
        * libsupc++/guard.cc (struct mutex_wrapper): Move into
        anonymous namespace.

From-SVN: r129218

libstdc++-v3/ChangeLog
libstdc++-v3/libsupc++/guard.cc

index 9c514b14855e7bdc38f9dc0e67b998b99afc624f..3b4e0286b73bf3d40904ac730574451c44db0449 100644 (file)
@@ -1,3 +1,8 @@
+2007-10-10  Jason Merrill  <jason@redhat.com>
+
+       * libsupc++/guard.cc (struct mutex_wrapper): Move into
+       anonymous namespace.
+
 2007-10-10  Paolo Carlini  <pcarlini@suse.de>
 
        * include/debug/list (list<>::list(list&&)): Fix.
index dca37f1f26a8ffa91a4b79c44166336c457456ff..6cf83b1c1f4238fc5c2d34ce1e8c7693962cc2fd 100644 (file)
@@ -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) 
   {