summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd/abstract_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-07-25 17:48:55 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-07-25 17:48:55 +0000
commit3cd8138a419cb165f56070ace0b21a1e63ec5a43 (patch)
tree51efe9abff24a1367be227aebf8e2901433b0b88 /libs/pbd/pbd/abstract_ui.cc
parenteb6e352dd0a307badf68ae4a216d15c03b4685de (diff)
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
Diffstat (limited to 'libs/pbd/pbd/abstract_ui.cc')
-rw-r--r--libs/pbd/pbd/abstract_ui.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/pbd/pbd/abstract_ui.cc b/libs/pbd/pbd/abstract_ui.cc
index b300a62dd8..8ebc12a433 100644
--- a/libs/pbd/pbd/abstract_ui.cc
+++ b/libs/pbd/pbd/abstract_ui.cc
@@ -11,9 +11,6 @@
using namespace std;
-template<typename R>
-Glib::StaticPrivate<typename AbstractUI<R>::RequestBuffer> AbstractUI<R>::per_thread_request_buffer;
-
template<typename RequestBuffer> void
cleanup_request_buffer (void* ptr)
{
@@ -28,11 +25,14 @@ cleanup_request_buffer (void* ptr)
{
- Glib::Mutex::Lock lm (rb->ui.request_buffer_map_lock);
+ Glib::Threads::Mutex::Lock lm (rb->ui.request_buffer_map_lock);
rb->dead = true;
}
}
+template<typename R>
+Glib::Threads::Private<typename AbstractUI<R>::RequestBuffer> AbstractUI<R>::per_thread_request_buffer (cleanup_request_buffer<AbstractUI<R>::RequestBuffer>);
+
template <typename RequestObject>
AbstractUI<RequestObject>::AbstractUI (const string& name)
: BaseUI (name)
@@ -87,7 +87,7 @@ AbstractUI<RequestObject>::register_thread (string target_gui, pthread_t thread_
only at thread initialization time, not repeatedly,
and so this is of little consequence.
*/
- Glib::Mutex::Lock lm (request_buffer_map_lock);
+ Glib::Threads::Mutex::Lock lm (request_buffer_map_lock);
request_buffers[thread_id] = b;
}
@@ -100,7 +100,7 @@ AbstractUI<RequestObject>::register_thread (string target_gui, pthread_t thread_
dead. it will then be deleted during a call to handle_ui_requests()
*/
- per_thread_request_buffer.set (b, cleanup_request_buffer<RequestBuffer>);
+ per_thread_request_buffer.set (b);
}
template <typename RequestObject> RequestObject*
@@ -209,7 +209,7 @@ AbstractUI<RequestObject>::handle_ui_requests ()
/* and now, the generic request buffer. same rules as above apply */
- Glib::Mutex::Lock lm (request_list_lock);
+ Glib::Threads::Mutex::Lock lm (request_list_lock);
while (!request_list.empty()) {
RequestObject* req = request_list.front ();
@@ -322,7 +322,7 @@ AbstractUI<RequestObject>::send_request (RequestObject *req)
single-reader/single-writer semantics
*/
DEBUG_TRACE (PBD::DEBUG::AbstractUI, string_compose ("%1/%2 send heap request type %3\n", name(), pthread_self(), req->type));
- Glib::Mutex::Lock lm (request_list_lock);
+ Glib::Threads::Mutex::Lock lm (request_list_lock);
request_list.push_back (req);
}