remove use of boost::thread/boost::mutex; bump glibmm requirement to 2.30 in order to pick up Glib::Threads::Mutex which can be used statically, use that to replace boost::mutex; add required inclusion of <cerrno> in a couple of places
git-svn-id: svn://localhost/ardour2/branches/3.0@13076 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e284a53349
commit
1cdf02ae2f
@ -20,6 +20,7 @@
|
||||
|
||||
#include <cassert>
|
||||
#include <stdexcept>
|
||||
#include <cerrno>
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gstdio.h>
|
||||
|
@ -16,6 +16,8 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <cerrno>
|
||||
|
||||
#include <glibmm/fileutils.h>
|
||||
#include <glibmm/miscutils.h>
|
||||
|
||||
|
@ -21,13 +21,13 @@
|
||||
#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;
|
||||
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
@ -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;
|
||||
|
2
wscript
2
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')
|
||||
|
Loading…
Reference in New Issue
Block a user