diff --git a/macosx/JackMachThread.cpp b/macosx/JackMachThread.cpp index 2d809c2a..77191706 100644 --- a/macosx/JackMachThread.cpp +++ b/macosx/JackMachThread.cpp @@ -118,13 +118,13 @@ UInt32 JackMachThread::GetThreadPriority(pthread_t thread, int inWhichPriority) return 0; } -int JackMachThread::GetParams(UInt64* period, UInt64* computation, UInt64* constraint) +int JackMachThread::GetParams(pthread_t thread, UInt64* period, UInt64* computation, UInt64* constraint) { thread_time_constraint_policy_data_t theTCPolicy; mach_msg_type_number_t count = THREAD_TIME_CONSTRAINT_POLICY_COUNT; boolean_t get_default = false; - kern_return_t res = thread_policy_get(pthread_mach_thread_np(pthread_self()), + kern_return_t res = thread_policy_get(pthread_mach_thread_np(thread), THREAD_TIME_CONSTRAINT_POLICY, (thread_policy_t) & theTCPolicy, &count, @@ -172,7 +172,7 @@ int JackMachThread::AcquireRealTimeImp(pthread_t thread, UInt64 period, UInt64 c UInt64 int_period; UInt64 int_computation; UInt64 int_constraint; - GetParams(&int_period, &int_computation, &int_constraint); + GetParams(thread, &int_period, &int_computation, &int_constraint); return 0; } diff --git a/macosx/JackMachThread.h b/macosx/JackMachThread.h index 4e17959b..533e4dea 100644 --- a/macosx/JackMachThread.h +++ b/macosx/JackMachThread.h @@ -107,7 +107,7 @@ class SERVER_EXPORT JackMachThread : public JackPosixThread int AcquireRealTime(int priority); int DropRealTime(); void SetParams(UInt64 period, UInt64 computation, UInt64 constraint); - static int GetParams(UInt64* period, UInt64* computation, UInt64* constraint); + static int GetParams(pthread_t thread, UInt64* period, UInt64* computation, UInt64* constraint); static int SetThreadToPriority(pthread_t thread, UInt32 inPriority, Boolean inIsFixed, UInt64 period, UInt64 computation, UInt64 constraint); static int AcquireRealTimeImp(pthread_t thread, UInt64 period, UInt64 computation, UInt64 constraint); diff --git a/macosx/coreaudio/JackCoreAudioDriver.cpp b/macosx/coreaudio/JackCoreAudioDriver.cpp index 6c2222e7..0c3a1de9 100644 --- a/macosx/coreaudio/JackCoreAudioDriver.cpp +++ b/macosx/coreaudio/JackCoreAudioDriver.cpp @@ -218,7 +218,7 @@ OSStatus JackCoreAudioDriver::MeasureCallback(AudioDeviceID inDevice, AudioDeviceStop(driver->fDeviceID, MeasureCallback); jack_log("JackCoreAudioDriver::MeasureCallback called"); - JackMachThread::GetParams(&driver->fEngineControl->fPeriod, &driver->fEngineControl->fComputation, &driver->fEngineControl->fConstraint); + JackMachThread::GetParams(pthread_self(), &driver->fEngineControl->fPeriod, &driver->fEngineControl->fComputation, &driver->fEngineControl->fConstraint); // Setup threadded based log function set_threaded_log_function();