Correct JackMessageBuffer::SetInitCallback.

This commit is contained in:
Stephane Letz 2012-03-20 18:17:57 +01:00
parent 3fee25ae59
commit 4a289f48d9
2 changed files with 5 additions and 5 deletions

View File

@ -111,7 +111,7 @@ bool JackMessageBuffer::Execute()
/* and we're done */
fGuard.Signal();
}
/* releasing the mutex reduces contention */
fGuard.Unlock();
Flush();
@ -177,17 +177,17 @@ int JackMessageBuffer::SetInitCallback(JackThreadInitCallback callback, void *ar
fGuard.Signal()
// wait for it to be done
fGuard.Wait();
// and we're done
fGuard.Unlock();
*/
fGuard.Unlock();
int count = 0;
while (fInit && ++count < 1000) {
/* wake msg buffer thread */
fGuard.Signal();
JackSleep(1000);
}
/* and we're done */
fGuard.Unlock();
if (count == 1000) goto error;
return 0;
}

View File

@ -163,7 +163,7 @@ void Collect(FrameTimeCollector* TheFrame)
void Jack_Thread_Init_Callback(void *arg)
{
Log("Init callback has been successfully called. (msg from callback)\n");
Log("Init callback has been successfully called from thread = %x. (msg from callback)\n", pthread_self());
init_clbk = 1;
}