-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write is sometimes called from the System process #6
Comments
Original comment by |
Original comment by |
Overview Approach Here's an example of how you can use the current pointer to check if the driver's write function is being called from a process context or not:
In this example, the in_interrupt() function is used to check if the driver's write function is being called from an interrupt context. If it is, then the interrupt context code is executed. If it's not, then the current pointer is checked to see if it's valid. If it is, then the driver's write function is called using the file->f_op->write() function. If the current pointer is not valid, then the code for other contexts, such as system worker threads, is executed. By using the current pointer in this way, we can ensure that the driver's write function is called within a writing process context and not from a system worker thread. |
Original issue reported on code.google.com by
sebastian.poeplau
on 29 Jun 2012 at 9:11The text was updated successfully, but these errors were encountered: