Messages in this thread | | | Date | Sat, 20 Nov 2004 19:31:22 +0100 | From | Manfred Spraul <> | Subject | Re: wait_event_interruptible() seems non-atomic |
| |
Jan Engelhardt wrote:
>>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) > > > As far as I can see BufferLock is only held for tiny sections - the longest thing is a copy_to_user(), i.e. at worst a swap in. I my opinion the delay for handling Ctrl+C is therefore negligible and not worth the added code for handling down_interruptible(). 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.
-- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |