On Wed, Sep 26, 2012 at 05:19:50PM +0530, Rahul Bedarkar wrote:
> Hi,
> 
> I have to capture kernel udev events through libudev. One of API
> provides asynchronous events by reading on file descriptor. I found
> that there two ways to do that.
> 
> 1) select call
> 2) epoll
> 
> I also found that epoll is smarter and meant to replace old select call.
> 
> What are your thoughts on these ? Which one is better ?

I personally prefer event loop libraries such as libev[1]. They handle
all the interfacing with the event mechanism the OS provides, so you
only need to register a callback function.

HTH,
Jonathan Neuschäfer

[1] http://software.schmorp.de/pkg/libev.html

_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to