RingBufferNPT<ThreadBuffers*>* BufferManager::thread_buffers = 0;
std::list<ThreadBuffers*>* BufferManager::thread_buffers_list = 0;
-Glib::StaticMutex BufferManager::rb_mutex = GLIBMM_STATIC_MUTEX_INIT;
+Glib::Threads::Mutex BufferManager::rb_mutex;
using std::cerr;
using std::endl;
thread_buffers->write (&ts, 1);
thread_buffers_list->push_back (ts);
}
- cerr << "Initialized thread buffers, readable count now " << thread_buffers->read_space() << endl;
+ // cerr << "Initialized thread buffers, readable count now " << thread_buffers->read_space() << endl;
}
ThreadBuffers*
BufferManager::get_thread_buffers ()
{
- Glib::Mutex::Lock em (rb_mutex);
+ Glib::Threads::Mutex::Lock em (rb_mutex);
ThreadBuffers* tbp;
if (thread_buffers->read (&tbp, 1) == 1) {
- cerr << "Got thread buffers, readable count now " << thread_buffers->read_space() << endl;
+ // cerr << "Got thread buffers, readable count now " << thread_buffers->read_space() << endl;
return tbp;
}
void
BufferManager::put_thread_buffers (ThreadBuffers* tbp)
{
- Glib::Mutex::Lock em (rb_mutex);
+ Glib::Threads::Mutex::Lock em (rb_mutex);
thread_buffers->write (&tbp, 1);
- cerr << "Put back thread buffers, readable count now " << thread_buffers->read_space() << endl;
+ // cerr << "Put back thread buffers, readable count now " << thread_buffers->read_space() << endl;
}
void