Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GetBusFrameNumber And Preemption



Hi Chris,

Your analysis is correct, and your solution sounds reasonable.

Rhoads Hollowell
USB Software Team
Apple Computer, Inc.

On Oct 14, 2006, at 10:15 AM, Chris Cooksey wrote:

I am trying to get accurate time stamps during usb isoc-read completion
routines. Looking at the darwin source code for GetBusFrameNumber() I see
that no effort is made to guard for the possibility that my thread is
preempted between the time the AbsoluteTime is measured, and the current bus
frame number is obtained.


I presume it is possible to be preempted in the kernel, and depending on the
system load, I presume its possible to be in the ready queue for some
considerable time.


If I want super-accurate time stamps, should I repeat calls to
GetBusFrameNumber() until I can be sure that the call wasn't interrupted?


Thanks,
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden
References: 
 >GetBusFrameNumber And Preemption (From: Chris Cooksey <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.