Gustavo Sverzut Barbieri wrote:

>> +void _ecore_main_loop_init(void)
>> +{
>> +   epoll_fd = epoll_create(1);
>> +   if (epoll_fd < 0)
>> +     ERR("Failed to create epoll fd!");
> 
> make it a CRIT(), so it will abort when eina is set to abort on
> critical. This will make the application not work, so it is critical
> IMO.

Ack.

>> +static inline int _ecore_epoll_add(Ecore_Fd_Handler *fdh)
> ...
>> +static inline void _ecore_epoll_remove(Ecore_Fd_Handler *fdh)
> ...
>> +static inline int ecore_epoll_modify(Ecore_Fd_Handler *fdh)
> 
> you could make these more generically named: ecore_fdpoller_ or
> something like this (not epoll) and have the #ifdef inside them. It is
> more similar to what other Ecore code does.

Ack.

> isn't 10 too short? Better to make it 100 or so? It will not take that
> much more memory, and should avoid some syscalls when system is doing
> some networking (ie: loading couple of resources in parallel should
> activate dozen of fds by itself, then we have X11 and possible more
> fds that app use if doing threads/ecore_thread).

Hrm. Easy enough to change.

>> +        ret = epoll_wait(epoll_fd, ev, num_epoll_fds, timeout);
> 
> ouch, this breaks ecore_main_loop_glib_integrate()  as there is no way
> to override the poller anymore. In my opinion it is hard to have just
> a select() and map it to epoll, it will not be efficient. As we're not
> 1.0 yet, maybe we could just replace ecore_main_loop_select_func_set()
> to receive a different parameter, or receive 2 functions, one for
> select() and another for epoll?  This needs thinking.

The epoll fd itself can be polled on, so we can use main_loop_select() to poll 
on it, 
and that will keep GTK integration.  I'm doing this patch as a bit of research 
into
GTK-EFL integration... :-)

>> +   _ecore_main_loop_init();
> 
> As someone else said, we better have a shutdown to close() the epoll_fd.

Ack.

Mike


------------------------------------------------------------------------------

_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to