site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=bKdrNP+1UPDAF05pKio+nS+Rfuu8yav0MCnIVHXsVUifTQjGV24xRVeOwxSQenzpKTTLjV/VWEB97LCxaLnE8Nyn2U06qjpQkyAg+bWs5kOHEf1ENS87/2USMsU391f5evS5rfBcuYZhTPd/sEeNqh3ftoJFg5Ll/WnhAvAyYSE= I'm trying to get a feedback-loop for a digital-analog converter running at 40 kHz (or faster). Ideally, I would like to respond to each sample as it comes and not let any back up. This is essentially what I have so far: thread_priority_set(...) start while(running) { if(sample is ready) { read/write usleep(0); } } stop I have been able get it to run for 24 sec with only 100 to 200 interruptions that, each time, cause roughly 4 samples to back up -- on a 1.17 GHz dual-core G4, using a 3rd-party driver which communicates via PCI. Since the device-manufacturer doesn't yet provide PCI Express cards, I am unable to upgrade computers at this time. Any suggestions on how to reduce the interruption latency? Using a multi-core computer, can I tell the scheduler to ensure that the thread runs uninterrupted (well, with interruptions limited to 30 or 40 usec in latency) on a CPU at all times? Is it necessary to work in the kernel to achieve what I'm looking for? Can I increase the granularity of usleep()? Thanks for your time! -CJ _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com