![]() | |||||||||||
Messages in this thread Complete thread (EXPERIMENTAL) |
Hi list, I have a question concerning the strategy routine of a block device driver. Any hints or pointers would be appreciated; a search of the list archives did not reveal anything. Alessandro Rubini & Jonathan Corbet write on p. 331 of their book "Linux Device Drivers", 2nd ed: "The request function has one very important constraint: it must be atomic. request is not usually called in direct response to user requests, and it is not running in the context of any particular process. It can be called at interrupt time, from tasklets, or from any number of other places. Thus, it must not sleep while carrying out its tasks." Why, then, is sleep_on() used happily all over linux/drivers/block/amiflop.c? According to the above statement, this should not work. I also use sleep_on(), together with a kernel timer, in order to implement a simple delay in my own device driver, and it has always worked fine. Why? Am I just having good luck? Yours confused, -- michael krause -- .oO[ http://www.soundtracker.org/raw/ ]Oo. | ||||||||||
![]() | |||||||||||
| Last update: 2005-03-22 12:31 [W:0.083 / U:0.620 seconds] ©2003-2005 Jasper Spaans | |||||||||||