Okay... I have been trying to use thread_policy_set but as per the documentation says there is a global variable HZ
"The time values are in terms of Mach absolute time units. Since these values differ according to the bus speed of your computer, you should generally use numbers relative to HZ (a global variable containing the current number of ticks per second). You can either handle this conversion yourself by dividing this value by an appropriate quantity or use the conversion routines described in “Using Kernel Time Abstractions”. Say your computer reports 133 million for the value of HZ. If you pass the example values given as arguments to this function, your thread tells the scheduler that it needs approximately 40,000 (HZ/3300) out of the next 833,333 (HZ/160) bus cycles. The preemptible value (1) indicates that those 40,000 bus cycles need not be contiguous. However, the constraint value (HZ/2200) tells the scheduler that there can be no more than 60,000 bus cycles between the start of computation and the end of computation."
I can't seem to find this variable anywhere... Does it exist? and if it doesn't what is the appropriate value to go here? I have searched everywhere for this and although other people have said similar comments there never seems to be an answer, :(
Any help would be greatly appreciated Thx, Jon
|