remove use of boost::thread/boost::mutex; bump glibmm requirement to 2.30 in order...
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 24 Jul 2012 21:43:05 +0000 (21:43 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 24 Jul 2012 21:43:05 +0000 (21:43 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@13076 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/export_profile_manager.cc
libs/ardour/session_directory.cc
libs/pbd/pbd/signals.h
libs/pbd/pbd/signals.py
libs/pbd/signals.cc
wscript

index 4d9413cbce1329f3fa02627e9bdcc2e7e2fc3e7c..af7f6a73f810cbcaaf8663a177e4395dc59316d7 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <cassert>
 #include <stdexcept>
+#include <cerrno>
 
 #include <glib.h>
 #include <glib/gstdio.h>
index 5f3e984955de7ee82773e3fc41e00a8fa950d608..ec4fded685fcf1e4aef841e8bdee5c94f4f88afc 100644 (file)
@@ -16,6 +16,8 @@
        Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#include <cerrno>
+
 #include <glibmm/fileutils.h>
 #include <glibmm/miscutils.h>
 
index dc53b31f94422047a1865ce8d01626c6a8b8f81a..69c52f57cf9b330cf9ca76edf5e29c46ebeba720 100644 (file)
 #define __pbd_signals_h__
 
 #include <list>
-#include <glibmm/thread.h>
+#include <map>
+#include <glibmm/threads.h>
 
 #include <boost/noncopyable.hpp>
 #include <boost/bind.hpp>
 #include <boost/bind/protect.hpp>
 #include <boost/function.hpp>
-#include <boost/thread/mutex.hpp>
 #include <boost/enable_shared_from_this.hpp>
 #include <boost/optional.hpp>
 
@@ -44,7 +44,7 @@ public:
        virtual void disconnect (boost::shared_ptr<Connection>) = 0;
 
 protected:
-       boost::mutex _mutex;
+        Glib::Threads::Mutex _mutex;
 };
 
 class Connection : public boost::enable_shared_from_this<Connection>
@@ -54,7 +54,7 @@ public:
 
        void disconnect ()
        {
-               boost::mutex::scoped_lock lm (_mutex);
+               Glib::Threads::Mutex::Lock lm (_mutex);
                if (_signal) {
                        _signal->disconnect (shared_from_this ());
                        _signal = 0;
@@ -63,12 +63,12 @@ public:
 
        void signal_going_away ()
        {
-               boost::mutex::scoped_lock lm (_mutex);
+               Glib::Threads::Mutex::Lock lm (_mutex);
                _signal = 0;
        }
 
 private:
-       boost::mutex _mutex;
+        Glib::Threads::Mutex _mutex;
        SignalBase* _signal;
 };
 
@@ -147,7 +147,7 @@ class ScopedConnectionList  : public boost::noncopyable
               one from another.
         */
 
-       Glib::Mutex _lock;
+       Glib::Threads::Mutex _lock;
 
        typedef std::list<ScopedConnection*> ConnectionList;
        ConnectionList _list;
index f3dfd05d821875bd1851b99b016e3d2128326c1c..24640fca72130e71d8842b32f9bf2fde9e97350b 100644 (file)
@@ -110,7 +110,7 @@ def signal(f, n, v):
     print("", file=f)
     print("\t~Signal%d () {" % n, file=f)
 
-    print("\t\tboost::mutex::scoped_lock lm (_mutex);", file=f)
+    print("\t\tGlib::Threads::Mutex::Lock lm (_mutex);", file=f)
     print("\t\t/* Tell our connection objects that we are going away, so they don't try to call us */", file=f)
     print("\t\tfor (%sSlots::iterator i = _slots.begin(); i != _slots.end(); ++i) {" % typename, file=f)
 
@@ -234,7 +234,7 @@ def signal(f, n, v):
     print("", file=f)
     print("\t\tSlots s;", file=f)
     print("\t\t{", file=f)
-    print("\t\t\tboost::mutex::scoped_lock lm (_mutex);", file=f)
+    print("\t\t\tGlib::Threads::Mutex::Lock lm (_mutex);", file=f)
     print("\t\t\ts = _slots;", file=f)
     print("\t\t}", file=f)
     print("", file=f)
@@ -249,7 +249,7 @@ def signal(f, n, v):
                        */
                        bool still_there = false;
                        {
-                               boost::mutex::scoped_lock lm (_mutex);
+                               Glib::Threads::Mutex::Lock lm (_mutex);
                                still_there = _slots.find (i->first) != _slots.end ();
                        }
 
@@ -269,7 +269,7 @@ def signal(f, n, v):
 
     print("""
        bool empty () {
-               boost::mutex::scoped_lock lm (_mutex);
+               Glib::Threads::Mutex::Lock lm (_mutex);
                return _slots.empty ();
        }
 """, file=f)
@@ -287,7 +287,7 @@ def signal(f, n, v):
        boost::shared_ptr<Connection> _connect (slot_function_type f)
        {
                boost::shared_ptr<Connection> c (new Connection (this));
-               boost::mutex::scoped_lock lm (_mutex);
+               Glib::Threads::Mutex::Lock lm (_mutex);
                _slots[c] = f;
                return c;
        }""", file=f)
@@ -295,7 +295,7 @@ def signal(f, n, v):
     print("""
        void disconnect (boost::shared_ptr<Connection> c)
        {
-               boost::mutex::scoped_lock lm (_mutex);
+               Glib::Threads::Mutex::Lock lm (_mutex);
                _slots.erase (c);
        }
 };    
index cafb98f6bfc52e57028ecd60dc16ace280e5a511..ff535603ef41a85d937d07ec68ba3b37605cf939 100644 (file)
@@ -34,14 +34,14 @@ ScopedConnectionList::~ScopedConnectionList()
 void
 ScopedConnectionList::add_connection (const UnscopedConnection& c)
 {
-       Glib::Mutex::Lock lm (_lock);
+       Glib::Threads::Mutex::Lock lm (_lock);
        _list.push_back (new ScopedConnection (c));
 }
 
 void
 ScopedConnectionList::drop_connections ()
 {
-       Glib::Mutex::Lock lm (_lock);
+       Glib::Threads::Mutex::Lock lm (_lock);
 
        for (ConnectionList::iterator i = _list.begin(); i != _list.end(); ++i) {
                delete *i;
diff --git a/wscript b/wscript
index 3cc7b90dd9cbb630e13388e6facf6a8d55e5bb63..e311e3ddcc8d511cd1198d416b4e3e5fd76b2560 100644 (file)
--- a/wscript
+++ b/wscript
@@ -561,7 +561,7 @@ def configure(conf):
 
     autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2')
     autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.2')
-    autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
+    autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.30.0')
     autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18')
     autowaf.check_pkg(conf, 'giomm-2.4', uselib_store='GIOMM', atleast_version='2.2')
     autowaf.check_pkg(conf, 'libcurl', uselib_store='CURL', atleast_version='7.0.0')