Messages in this thread | | | Date | Sun, 21 Nov 2004 11:00:29 +0100 | From | Manfred Spraul <> | Subject | Re: wait_event_interruptible() seems non-atomic |
| |
Jan Engelhardt wrote:
>>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()? > > > It's more about code complexity than performance. down_interruptible() means that you must handle failures - double check that you free all temporary allocations, decrease all reference counts (make the reference counts atomic_t), etc.
-- 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/
| |