This is an early inventory of OS X Psychtoolbox priority functions, revealing what underlies the OS 9 lookalike priority calls. Documentation has been added to PTB .m help files, but this inventory might be useful to developers so I have not thrown it out.  Maybe we should transfer the contents below to the build-in PTB documentation.

Allen Ingling
28 October 2004

priority stuff

mex files (and other compiled C):

file						scripting API			purpose 
                                                                                             
MachSetPriority.mexmac 		PsychScriptingGlue		Sets Darwin "Time Constraint" Priority and restores to normal.
TestPriority.mexmac			PsychScriptingGlue		Runs a C timing loop inside a mex file

MachSetPriorityMex.mexmac  	MATLAB Mex			Sets  any  Darwin priority setting
MachGetPriorityMex.mexmac  	MATLAB Mex			Reports the current Darwin priority setting
TestPriorityMex.mexmac		MATLAB Mex			Runs a C timing loop inside a mex file

StandaloneTimingProgram		none					Runs a timing loop in a separate process

Comments:
The functions which use the mex api are more general and more polished than their corresponding scripting glue versions.  They should be rewritten to use scripting glue now that the timing bug is solved.

m files:

file							uses					purpose
MachSetTimeConstraintPriority.m		MachSetPriorityMex.mexmac	Wrapper for MachPriorityMex.mexmac converting units of secs to bus ticks
MachGetPriorityFlavor.m				MachGetPriorityMex.mexmac   Names the current priority flavor without associated paramters
MachGetPriorityMex.m					-			                         Help file for MachGetPriority.mexmac
MachSetPriorityMex.m					-			                         Help file for MachSetPriority.mexmac
MachSetStandardPriority.m				MachSetPriorityMex.mexmac  Restores normal priority settings

TestMATLABTimingOSX.m				MachSetTimeConstraintPriority Runs a scripted timing loop and analyses results.
TestStandaloneTimingOSX.m			StandaloneTimingProgram       Launches StandaloneTimingProgram and analyses results