a case of synchronize between process context and interrupt context, this is quite useful for driver code.
e.g. block operation is executed in a user process, which then can be switch out, ISR will be responsible to wake it up, and resume the operation.
in linux, the "WAIT QUEUE" is used to solve such a scenario, for convenience, add an url of this topic here. go back to this topic later.
http://hi.baidu.com/spiderjun/blog/item/d43de7c4bcd3c3ca39db493a.html
while, some other managed object, such as boolean can also be a method, generally,
1. create managed object,
2. wait on it;
3. ISR set the object value to notify the process.
this should be a simple idea especially for the 1-on-1 mode, while queue can deal more complex mode.
Monday, October 6, 2008
wakeup process from interrupt
Posted by winman at 10:32 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment