and the race can happen between the test if the process should sleep and actually going to sleep?
I dont care if it is depreceated or not. I just want to know why it is depreceated.
it's deprecated because it can't be used without races... basically it's nearly impossible to use correctly!
Did you have a look in the kernel-2.6.18 tree how many drivers still use interruptible_sleep_on() ?
not that many that are actually used hopefully; they're ALL bugs, with maybe one or two exceptions who got lucky.
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/