Re: poll: allow f_op->poll to sleep, take #3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Davide Libenzi wrote:
> On Sun, 23 Nov 2008, Tejun Heo wrote:
> 
>> +static int pollwake(wait_queue_t *wait, unsigned mode, int sync, void *key)
>> +{
>> +	struct poll_wqueues *pwq = wait->private;
>> +	DECLARE_WAITQUEUE(dummy_wait, pwq->polling_task);
>> +
>> +	set_mb(pwq->triggered, 1);
>> +
>> +	/* perform the default wake up operation */
>> +	return default_wake_function(&dummy_wait, mode, sync, key);
>> +}
> 
> Wouldn't it be nicer to un-static try_to_wake_up() (or a wrapper) instead 
> of setting up a fake wait queue just to use default_wake_function(), just 
> to wake up a task?

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.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux