[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0811221831550.19456@alien.or.mcafeemobile.com>
Date: Sat, 22 Nov 2008 18:35:38 -0800 (PST)
From: Davide Libenzi <davidel@...ilserver.org>
To: Tejun Heo <htejun@...il.com>
cc: Andrew Morton <akpm@...ux-foundation.org>,
Matthew Wilcox <matthew@....cx>,
Miklos Szeredi <miklos@...redi.hu>, arjan@...ux.intel.com,
Linus Torvalds <torvalds@...ux-foundation.org>,
hch@...radead.org, Ingo Molnar <mingo@...e.hu>,
rminnich@...dia.gov, ericvh@...il.com,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel@...r.kernel.org
Subject: Re: poll: allow f_op->poll to sleep, take #3
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?
- Davide
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists