On Thu, Feb 15, 2007 at 04:59:16PM -0800, Andrew Morton wrote:
No, it won't get you out of down_interruptible(). But the code would have
failed trivial testing so perhaps we're missing something.
It seems crufty to use semaphores in this manner. afaict all we're doing
here is poking a kernel thread and asking it to do a bit of work. The
standard way of doing this is to go to sleep on a waitqueue_head.
We don't even need the waitqueue. Because it's just a single thread
waiting we can simply use wake_up_process. (.. which you actually
used in the second half of the example, humm..)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV