On Fri, Jul 12, 2002 at 10:14:26AM -0400, anton wilson wrote: > RULE #3: Lock acquire and release must be performed by same task [...] > If within a driver a task locked a semaphore on a write, and then a usb > interrupt that caused a read of the data being written unlocked the > semaphore, would this be wrong? Technically, two tasks are not locking and > unlocked but the kernel is unlocking on behalf of no task. Anton, you probably should investigate using wait queues for your driver; the task calling read() or write() or whatever on your driver gets put to sleep until the "bottom half" wakes it up when it can satisfy the "top half". -- http://www.wirex.com/
Attachment:
pgp00125.pgp
Description: PGP signature