Completion Interface:-
Many parts of the kernel initiate certain activities as separate execution threads and then wait for them to complete. The completion interface is an efficient and easy way to implement such code patterns.
Some example usage scenarios include the following:
1. Your driver module is assisted by a kernel thread. If you rmmod the module, the release() method is invoked before removing the module code from kernel space. The release routine asks the thread to kill itself and blocks until the thread completes its exit.
2. You are writing a portion of a block device driver that queues a read request to a device. This triggers a state machine change implemented as a separate thread or work queue. The driver wants to wait until the operation completes before proceeding with another activity.
3. An application requests an Analog-to-Digital Converter (ADC) driver for a data sample. The driver initiates a conversion request waits, until an interrupt signals completion of conversion, and returns the data.


LinkBack URL
About LinkBacks
Reply With Quote

LinkBacks Enabled by vBSEO
Bookmarks