Merge branch 'master' into cairocanvas
[ardour.git] / libs / pbd / pbd / stacktrace.h
index 40275fd536d4ff9c5bf58dff7b5e7caa972b12ec..f3c7baf7d78fb6bb72dfec10d2b1ac2f5460244a 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <iostream>
 #include <ostream>
-#include <glibmm/thread.h>
+#include <glibmm/threads.h>
 #include <list>
 
 #ifdef HAVE_EXECINFO
@@ -37,6 +37,7 @@
 namespace PBD {
        void stacktrace (std::ostream& out, int levels = 0);
        void trace_twb();
+       std::string demangle (const std::string&);
 
 template<typename T>
 class thing_with_backtrace 
@@ -50,7 +51,7 @@ class thing_with_backtrace
 #else 
            allocation_backtrace_size = 0;
 #endif
-           Glib::Mutex::Lock lm (all_mutex);
+           Glib::Threads::Mutex::Lock lm (all_mutex);
            all.push_back (this);
     }
 
@@ -62,7 +63,7 @@ class thing_with_backtrace
 #else 
            allocation_backtrace_size = 0;
 #endif
-           Glib::Mutex::Lock lm (all_mutex);
+           Glib::Threads::Mutex::Lock lm (all_mutex);
            all.push_back (this);
     }
 
@@ -70,7 +71,7 @@ class thing_with_backtrace
            if (allocation_backtrace_size) {
                    delete [] allocation_backtrace;
            }
-           Glib::Mutex::Lock lm (all_mutex);
+           Glib::Threads::Mutex::Lock lm (all_mutex);
            all.remove (this);
     }
 
@@ -105,11 +106,11 @@ private:
     void** allocation_backtrace;
     int allocation_backtrace_size;
     static std::list<thing_with_backtrace<T>* > all;
-    static Glib::StaticMutex all_mutex;
+    static Glib::Threads::Mutex all_mutex;
 };
 
 template<typename T> std::list<PBD::thing_with_backtrace<T> *> PBD::thing_with_backtrace<T>::all;
-template<typename T> Glib::StaticMutex PBD::thing_with_backtrace<T>::all_mutex = GLIBMM_STATIC_MUTEX_INIT;
+template<typename T> Glib::Threads::Mutex PBD::thing_with_backtrace<T>::all_mutex;
 
 } // namespace PBD