Merge branch 'master' into cairocanvas
[ardour.git] / libs / pbd / boost_debug.cc
index 3ddbc88e6d9e55cb7cb44e2160dd990d7eb7f74a..1267e7d1682379d20d10726307b2faab581d271c 100644 (file)
@@ -29,7 +29,7 @@
 #include <map>
 #include <set>
 #include <vector>
-#include <glibmm/thread.h>
+#include <glibmm/threads.h>
 #include <boost/shared_ptr.hpp>
 
 #include "pbd/stacktrace.h"
@@ -135,10 +135,10 @@ IPointerMap& interesting_pointers() {
         return *_interesting_pointers;
 }
 
-static Glib::Mutex* _the_lock;
-static Glib::Mutex& the_lock() {
+static Glib::Threads::Mutex* _the_lock;
+static Glib::Threads::Mutex& the_lock() {
         if (_the_lock == 0) {
-                _the_lock = new Glib::Mutex;
+                _the_lock = new Glib::Threads::Mutex;
         }
         return *_the_lock;
 }
@@ -167,7 +167,7 @@ boost_debug_shared_ptr_show_live_debugging (bool yn)
 void
 boost_debug_shared_ptr_mark_interesting (void* ptr, const char* type)
 {
-       Glib::Mutex::Lock guard (the_lock());
+       Glib::Threads::Mutex::Lock guard (the_lock());
        pair<void*,const char*> newpair (ptr, type);
        interesting_pointers().insert (newpair);
        if (debug_out) {
@@ -182,7 +182,7 @@ boost_debug_shared_ptr_operator_equals (void const *sp, void const *old_obj, int
                return;
        }
 
-       Glib::Mutex::Lock guard (the_lock());
+       Glib::Threads::Mutex::Lock guard (the_lock());
 
        if (is_interesting_object  (old_obj) || is_interesting_object (obj)) {
                if (debug_out) {
@@ -200,7 +200,7 @@ boost_debug_shared_ptr_operator_equals (void const *sp, void const *old_obj, int
                if (x != sptrs().end()) {
                        sptrs().erase (x);
                        if (debug_out) {
-                               cerr << "\tRemoved (by assigment) sp for " << old_obj << " @ " << sp << " UC = " << old_use_count << " (total sp's = " << sptrs().size() << ')' << endl;
+                               cerr << "\tRemoved (by assignment) sp for " << old_obj << " @ " << sp << " UC = " << old_use_count << " (total sp's = " << sptrs().size() << ')' << endl;
                        }
                }
        }
@@ -230,7 +230,7 @@ boost_debug_shared_ptr_reset (void const *sp, void const *old_obj, int old_use_c
                return;
        }
 
-       Glib::Mutex::Lock guard (the_lock());
+       Glib::Threads::Mutex::Lock guard (the_lock());
 
        if (is_interesting_object  (old_obj) || is_interesting_object (obj)) {
                if (debug_out) {
@@ -274,7 +274,7 @@ boost_debug_shared_ptr_reset (void const *sp, void const *old_obj, int old_use_c
 void
 boost_debug_shared_ptr_destructor (void const *sp, void const *obj, int use_count)
 {
-       Glib::Mutex::Lock guard (the_lock());
+       Glib::Threads::Mutex::Lock guard (the_lock());
        PointerMap::iterator x = sptrs().find (sp);
 
        if (x != sptrs().end()) {
@@ -289,7 +289,7 @@ void
 boost_debug_shared_ptr_constructor (void const *sp, void const *obj, int use_count)
 {
        if (is_interesting_object (obj)) {
-               Glib::Mutex::Lock guard (the_lock());
+               Glib::Threads::Mutex::Lock guard (the_lock());
                pair<void const*, SPDebug*> newpair;
 
                newpair.first = sp;
@@ -306,14 +306,14 @@ boost_debug_shared_ptr_constructor (void const *sp, void const *obj, int use_cou
 void
 boost_debug_count_ptrs ()
 {
-       Glib::Mutex::Lock guard (the_lock());
+       Glib::Threads::Mutex::Lock guard (the_lock());
        // cerr << "Tracking " << interesting_pointers().size() << " interesting objects with " << sptrs().size () << " shared ptrs\n";
 }
 
 void
 boost_debug_list_ptrs ()
 {
-       Glib::Mutex::Lock guard (the_lock());
+       Glib::Threads::Mutex::Lock guard (the_lock());
 
        if (sptrs().empty()) {
                cerr << "There are no dangling shared ptrs\n";