61 #ifndef __JackMachThread__
62 #define __JackMachThread__
64 #include <TargetConditionals.h>
66 #ifdef MY_TARGET_OS_IPHONE
67 typedef unsigned char Boolean;
71 #include "JackPosixThread.h"
72 #ifndef MY_TARGET_OS_IPHONE
73 #include <CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h>
76 #include <mach/thread_policy.h>
77 #include <mach/thread_act.h>
78 #ifndef MY_TARGET_OS_IPHONE
79 #include <CoreAudio/HostTime.h>
82 #define THREAD_SET_PRIORITY 0
83 #define THREAD_SCHEDULED_PRIORITY 1
101 static UInt32 GetThreadSetPriority(jack_native_thread_t thread);
102 static UInt32 GetThreadScheduledPriority(jack_native_thread_t thread);
103 static UInt32 GetThreadPriority(jack_native_thread_t thread,
int inWhichPriority);
108 :
JackPosixThread(runnable), fPeriod(period), fComputation(computation), fConstraint(constraint)
112 :
JackPosixThread(runnable, cancellation), fPeriod(0), fComputation(0), fConstraint(0)
117 int AcquireRealTime();
118 int AcquireSelfRealTime();
120 int AcquireRealTime(
int priority);
121 int AcquireSelfRealTime(
int priority);
124 int DropSelfRealTime();
126 void SetParams(UInt64 period, UInt64 computation, UInt64 constraint);
127 static int GetParams(jack_native_thread_t thread, UInt64* period, UInt64* computation, UInt64* constraint);
128 static int SetThreadToPriority(jack_native_thread_t thread, UInt32 inPriority, Boolean inIsFixed, UInt64 period, UInt64 computation, UInt64 constraint);
130 static int AcquireRealTimeImp(jack_native_thread_t thread, UInt64 period, UInt64 computation, UInt64 constraint);
131 static int AcquireRealTimeImp(jack_native_thread_t thread,
int priority, UInt64 period, UInt64 computation, UInt64 constraint)
133 return JackMachThread::AcquireRealTimeImp(thread, period, computation, constraint);
135 static int DropRealTimeImp(jack_native_thread_t thread);
The POSIX thread base class.
The base class for runnable objects, that have an Init and Execute method to be called in a threa...
Darwin threads. Real-time threads are actually "time constraint" threads.