Re: [PATCH] /dev/epoll update ...

From: Davide Libenzi (davidel@xmailserver.org)
Date: Wed Sep 19 2001 - 12:25:38 EST


On 19-Sep-2001 Christopher K. St. John wrote:
> Dan Kegel wrote:
>>
>> I'm getting ready to stress-test /dev/epoll finally.
>> In porting my Poller_devpoll.{cc,h} to support /dev/epoll, I noticed
>> the following issues:
>>
>
> Another issue to throw into the mix:
>
> The Banga, Mogul and Druschel[1] paper (which I understand
> was the inspiration for the Solaris /dev/poll which was the
> inspiration for /dev/epoll?) talks about having the poll
> return the current state of new descriptors. As far as I can
> tell, /dev/epoll only gives you events on state changes. So,
> for example, if you accept() a new socket and add it to the
> interest list, you (probably) won't get a POLLIN. That's
> not fatal, but it's awkward.

Being an event change notification you simply can't add the fd
to the "monitor" after you've issued the accept().
The skeleton for /dev/epoll usage is :

while (system_call(...) == FAIL) {

        wait_event();
}

- Davide

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Sep 23 2001 - 21:00:31 EST