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: UpTime() in IOKit ?



Hi Markus,

> We use to do polling with a timeout of some hundreds of microseconds.
> With a loop with IOSleep or IODelay inside we lose performance.
>
> What do you think ?

IODelay would be bad, yes.

IOSleep would be reasonable if your hardware or driver is doing nothing
else in the meantime.

Otherwise, add an IOTimerEventSource to your work loop to schedule a
callback at a later time.

Dan

On Monday, February 11, 2002, at 12:25 PM, Markus Bollinger wrote:

> Hi Garth!
>
> During the protocol with our card we have to wait on some bits in one
> of the
> cards registers.
> We use to do polling with a timeout of some hundreds of microseconds.
> With a loop with IOSleep or IODelay inside we lose performance.
>
> What do you think ?
>
>
> ----- Original Message -----
> From: "Garth Cummings" <email@hidden>
> To: "Markus Bollinger" <email@hidden>
> Cc: <email@hidden>
> Sent: Monday, February 11, 2002 6:14 PM
> Subject: Re: UpTime() in IOKit ?
>
>
>> Hi Markus,
>>
>> Before answering this, could you please provide more context on what
>> you
>> need to poll? Polling is strongly discouraged on Mac OS X since it
>> wastes CPU cycles that could be used to do real work for the user.
>>
>> Thanks,
>> --gc
> _______________________________________________
> darwin-drivers mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/darwin-drivers
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: UpTime() in IOKit ? (From: "Markus Bollinger" <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.