mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
convert from Glib:: to Glib::Threads for all thread-related API
git-svn-id: svn://localhost/ardour2/branches/3.0@13084 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
eb6e352dd0
commit
3cd8138a41
138 changed files with 664 additions and 703 deletions
|
|
@ -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) {
|
||||
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue