debugging for process thread issues
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 11 Jul 2012 15:05:51 +0000 (15:05 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 11 Jul 2012 15:05:51 +0000 (15:05 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@13027 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/buffer_manager.cc

index b30fd6ebb683634a95b564194c7e4a97ef5211a7..e3bc2cb97cf2895263cf6e7f011a15706cd9833c 100644 (file)
@@ -31,6 +31,9 @@ RingBufferNPT<ThreadBuffers*>* BufferManager::thread_buffers = 0;
 std::list<ThreadBuffers*>* BufferManager::thread_buffers_list = 0;
 Glib::StaticMutex BufferManager::rb_mutex = GLIBMM_STATIC_MUTEX_INIT;
 
+using std::cerr;
+using std::endl;
+
 void
 BufferManager::init (uint32_t size)
 {
@@ -45,6 +48,8 @@ BufferManager::init (uint32_t size)
                 thread_buffers->write (&ts, 1);
                thread_buffers_list->push_back (ts);
         }
+       cerr << "Initialized thread buffers, readable count now " << thread_buffers->read_space() << endl;
+
 }
 
 ThreadBuffers*
@@ -54,6 +59,7 @@ BufferManager::get_thread_buffers ()
         ThreadBuffers* tbp;
 
         if (thread_buffers->read (&tbp, 1) == 1) {
+               cerr << "Got thread buffers, readable count now " << thread_buffers->read_space() << endl;
                 return tbp;
         }
 
@@ -65,6 +71,7 @@ BufferManager::put_thread_buffers (ThreadBuffers* tbp)
 {
        Glib::Mutex::Lock em (rb_mutex);
         thread_buffers->write (&tbp, 1);
+       cerr << "Put back thread buffers, readable count now " << thread_buffers->read_space() << endl;
 }
 
 void