make use TempoMap::fetch() in RTproc threads more explicit
This also places the call in a more optimal location, right after it is woken because there is Route processing to be done
This commit is contained in:
@@ -140,8 +140,6 @@ private:
|
|||||||
/* engine / thread connection */
|
/* engine / thread connection */
|
||||||
PBD::ScopedConnectionList engine_connections;
|
PBD::ScopedConnectionList engine_connections;
|
||||||
void engine_stopped ();
|
void engine_stopped ();
|
||||||
|
|
||||||
void setup_thread_local_variables ();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -454,6 +454,10 @@ Graph::run_one ()
|
|||||||
DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("%1 goes to sleep\n", pthread_name ()));
|
DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("%1 goes to sleep\n", pthread_name ()));
|
||||||
_execution_sem.wait ();
|
_execution_sem.wait ();
|
||||||
|
|
||||||
|
/* update the thread-local tempo map ptr */
|
||||||
|
|
||||||
|
Temporal::TempoMap::fetch ();
|
||||||
|
|
||||||
if (g_atomic_int_get (&_terminate)) {
|
if (g_atomic_int_get (&_terminate)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -495,8 +499,10 @@ Graph::helper_thread ()
|
|||||||
|
|
||||||
pt->get_buffers ();
|
pt->get_buffers ();
|
||||||
|
|
||||||
|
/* just in case we need the thread local tempo map ptr before anything else */
|
||||||
|
Temporal::TempoMap::fetch ();
|
||||||
|
|
||||||
while (!g_atomic_int_get (&_terminate)) {
|
while (!g_atomic_int_get (&_terminate)) {
|
||||||
setup_thread_local_variables ();
|
|
||||||
run_one ();
|
run_one ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -550,7 +556,6 @@ again:
|
|||||||
|
|
||||||
/* After setup, the main-thread just becomes a normal worker */
|
/* After setup, the main-thread just becomes a normal worker */
|
||||||
while (!g_atomic_int_get (&_terminate)) {
|
while (!g_atomic_int_get (&_terminate)) {
|
||||||
setup_thread_local_variables ();
|
|
||||||
run_one ();
|
run_one ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -558,12 +563,6 @@ again:
|
|||||||
delete (pt);
|
delete (pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
Graph::setup_thread_local_variables ()
|
|
||||||
{
|
|
||||||
Temporal::TempoMap::fetch ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Graph::dump (int chain) const
|
Graph::dump (int chain) const
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user