Fix JackMachThread::Kill.

This commit is contained in:
Stephane Letz 2013-04-06 13:53:27 +02:00
parent 78d79d96b1
commit c44b7123b3
1 changed files with 2 additions and 3 deletions

View File

@ -160,12 +160,11 @@ int JackMachThread::GetParams(jack_native_thread_t thread, UInt64* period, UInt6
int JackMachThread::Kill()
{
// pthread_cancel still not yet implemented in Darwin (TO CHECK ON TIGER)
jack_log("JackMachThread::Kill");
if (fThread != (jack_native_thread_t)NULL) { // If thread has been started
jack_log("JackMachThread::Kill");
mach_port_t machThread = pthread_mach_thread_np(fThread);
int res = (thread_terminate(machThread) == KERN_SUCCESS) ? 0 : -1;
fStatus = kIdle;
fThread = (jack_native_thread_t)NULL;
return res;
} else {