Browse Source

Correct JackMachThread::GetParams.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3628 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/v1.9.4
sletz 16 years ago
parent
commit
34d1c0b627
3 changed files with 5 additions and 5 deletions
  1. +3
    -3
      macosx/JackMachThread.cpp
  2. +1
    -1
      macosx/JackMachThread.h
  3. +1
    -1
      macosx/coreaudio/JackCoreAudioDriver.cpp

+ 3
- 3
macosx/JackMachThread.cpp View File

@@ -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;
}



+ 1
- 1
macosx/JackMachThread.h View File

@@ -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);


+ 1
- 1
macosx/coreaudio/JackCoreAudioDriver.cpp View File

@@ -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();


Loading…
Cancel
Save