Re: Thread critical sections
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Oct 28, 2005, at 9:48 PM, Ed Wynne wrote: do { time1 = get_time_stamp(); position = get_sound_position(); time2 = get_time_stamp(); } while((sw_time2 - sw_time1) > SOME_THRESHOLD); time = (time1 + time2) / 2; This looks like an excellent idea. I will look into it. I'd like to thank everybody for their input. - Steve _______________________________________________ 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 You can't solve this problem the way you want with the available tools, but a slightly different approach should be workable. Assuming preemption events are rare (which they should be), you can detect failures instead of guaranteeing success. Something like: All you need to do is calibrate the SOME_THRESHOLD value with a timing loop at runtime. smime.p7s
participants (1)
-
Steve Checkoway