lkml.org 
[lkml]   [2008]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: poll: allow f_op->poll to sleep, take #3
Brad Boyer wrote:
> On Sun, Nov 23, 2008 at 12:05:53PM +0900, Tejun Heo wrote:
>> I thought try_to_wake_up() was made static to avoid abuse but then again
>> creating dummy waitqueue is an obvious abuse of waitqueue. What do
>> other people think? I'll be happy to use try_to_wake_up() directly.
>
> Do you need all the extra arguments? The function wake_up_process()
> is already a wrapper around try_to_wake_up() and is exported, but
> it doesn't have any arguments other than the task_struct and uses
> defaults for the other arguments. I'm not sure if anything in your
> code would break by ignoring the other possible values instead of
> passing them along from the arguments into the caller.

Hmmm... there was something which made wake_up_process() inappropriate.
Ah, okay, it was @mode. We can add a WARN_ON() if @mode is an
unexpected value and use a fixed one - TASK_INTERRUPTIBLE or TASK_ALL -
but that's even hackier than the waitqueue hack.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2008-11-23 04:57    [W:0.045 / U:1.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site