Re: wait_event_interruptible() seems non-atomic

From: Jan Engelhardt
Date: Sun Nov 21 2004 - 04:42:17 EST


>>>For example the use of down_interruptible() looks wrong to me, I'd use
>>>plain down().
>>
>>I'd like to be able to hit Ctrl+C (in the userspace application) whenever
>>possible. If that's not a reason, blame the book
>>http://www.xml.com/ldd/chapter/book/ch03.html#t8 ("the read method" a further
>>down below)
>
>You have already written the code, so I'd leave it as it is and I'll
>blame the book. They probably started from an older version of
>fs/pipe.c, which contained _interruptible calls. There are gone now,
>this allowed some cleanup.

Well, it's just one line so I would not care, and I'm also open for
suggestions. Does down_interruptible() cost so much more in CPU cycles than
down()?


Jan Engelhardt
--
Gesellschaft fÃr Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 GÃttingen, www.gwdg.de
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/