[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130114075257.GE4289@debian.localdomain>
Date: Mon, 14 Jan 2013 15:52:57 +0800
From: horseriver <horserivers@...il.com>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: netdev@...r.kernel.org
Subject: Re: when and where does ep_poll_callback be called ?
On Mon, Jan 14, 2013 at 08:35:29AM -0800, Randy Dunlap wrote:
> On 01/13/13 17:11, horseriver wrote:
> > hi:
> >
> >
> > I'm studying the epoll module , I can not find ep_poll_callback be called somewhere .
>
>
> It's right there in fs/eventpoll.c:
>
>
> /*
> * This is the callback that is used to add our wait queue to the
> * target file wakeup lists.
> */
> static void ep_ptable_queue_proc(struct file *file, wait_queue_head_t *whead,
> poll_table *pt)
> {
> struct epitem *epi = ep_item_from_epqueue(pt);
> struct eppoll_entry *pwq;
>
> if (epi->nwait >= 0 && (pwq = kmem_cache_alloc(pwq_cache, GFP_KERNEL))) {
> >>>>> init_waitqueue_func_entry(&pwq->wait, ep_poll_callback);
Thanks!
I know this is setting the callbak function into watqueue . But not the called place .
I want to know the code which calls ep_poll_callback .
Perhaps , it is called at tcp layer when a datagram is reached . but I have not find that key code .
> pwq->whead = whead;
> pwq->base = epi;
> add_wait_queue(whead, &pwq->wait);
> list_add_tail(&pwq->llink, &epi->pwqlist);
> epi->nwait++;
>
>
>
> --
> ~Randy
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists