Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6402

IOLockWakeup and IOLockSleep

$
0
0

i am curious about the event parameter that gets passed to IOLockWakeup and IOLockSleep{Deadline}.

i understand that the event is an address that gets passed to both functions. i am assuming this address is used to essentially notify the thread.

so my question is: assuming i is an int, and we are using its address, how do these functions know when to sleep and wakeup?

is the assumption that:-when iolockwakeup is called, that the contents of event are 0 (which it then changes to a non-zero value), and-when iolocksleepdeadline is called, that the contents of the event were 0 at the time it was called, and it will stop sleeping because the contents are nonzero

and when we keep calling these functions (in a workloop context) are the contents of the event parameter automatically set to zero when iolocksleep* is called (and when it wakes up), since iolockwakeup presumably changs this to a nonzero value?


Viewing all articles
Browse latest Browse all 6402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>