Are you in kernel or out of kernel? Are you likely to compete with a HAL audio thread, i.e. are you or your client using 'sound manager'? In kernel the timer is very good 1ms isn't really a big problem. However if you are competing with a 'real time' thread and IT uses more than 100us every millisecond, i.e. 10% CPU load then you wont have a clean solution. The APIs are accessible through <kern/thread_call.h> and <IOKit/IOTimerEventSource.h>. In anycase Darwin has a ~200us interrupt latency worst case so we can make no guarantee better than 200us even at primary interrupt. So the real problem is going to be with what other tasks and threads are you competing? The standard trap most ports of MacOS Classic caode has experienced is that X and Classic have different threading models and a shallow port usually ends in tears. Godfrey At 10:18 -0800 02-3-8, Sean Morrell wrote: I am writing an audio driver and would like to perform a very small amount of work at least every millisecond, with no more variance than a tenth of a millsecond. What mechanisms can be employed here? Can a thread be used? Can the priority be raised high enough to ensure it is running once every millsecond? Is there a timer as accurate as a Time Manager Task in OS 9? Thanks, Sean _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Godfrey van der Linden