[patch 1/4] ps3fb: thread updates

Christoph Hellwig hch at lst.de
Sat Feb 17 03:36:15 EST 2007


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..)




More information about the Linuxppc-dev mailing list