Re: [ANNOUNCE] Kernel Janitor's TODO list

David Woodhouse
2001-01-30T17:11:15Z

ttabi@interactivesi.com said:
> What is wrong with sleep_on()?

Are you asking me? If so, why did I not receive a copy in my inbox? If I
want to filter duplicates locally, I can. I don't.

It's almost impossible to use it safely, and the few ways you _can_ use it
safely are frowned upon, because they mostly involve using the BKL, usage of
which is slowly being phased out in favour of finer-grained locking.

This kind of code is far too common:

if (!event) {
/* BUT WHAT IF THE EVENT ARRIVES _NOW_? */
sleep_on(&event_wait);
}

--
dwmw2