Correct JackMessageBuffer::SetInitCallback.
This commit is contained in:
parent
3fee25ae59
commit
4a289f48d9
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue