Mailing Lists: Apple Mailing Lists

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

how to wait



Hi Everybody,
I am not a routine driver writer so I apologize if the question is trivial ( it seems to me it should be ) In spite of digging around quite some time in the developer docs and Apple examples I did not find how to do the following:
I driver I am porting has to wait for an event to occur. (hardware Interrupt or time out, which of course translates to interrupt as well). It should not return from the functions rather it should wait ( block). I have only found IODelay which burns CPU time or IOSleep which does not thus looks as a better candidate, but both are timed. Is my only choice to do IOSleep in a tight loop while monitoring a variable? Isn't there a system call to let the current thread block and wake it up form the interrupt routine? ( I beleive this is called conditional variable or semaphore. IOKit has no such mechanism?)
The examples I have seen all wait in user space rather than in the driver.
Any pointers examples would be highly appreciated.
thanks
Bela
_______________________________________________
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.


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.