[lkml]   [2000]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Interrupt/Sleep deadlock
In article <>,
Ivan Passos <> wrote:
>"You could use a semaphore for this. Initialize it to 0, then call
>down() from the ioctl, and up() from the interrupt handler. If the
>up() happens before the down(), the down() won't go to sleep."
>Initializing it to 0 means:
> cfg_sem = MUTEX_LOCKED;
>It's the simplest to understand, and it works great!!
>Does anybody see a problem with this implementation??


This is in fact how the SCSI layer has handled similar issues for a
_loong_ time now, so it had better work - and it does.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:39    [W:0.081 / U:4.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site