Hi Guys,
Here's a bit of a tidy up of the ecore patch that Raster just committed.
This is just formatting and moving a function around.
Let me know if there's any issues.
thanks,
Mike
ecore_main.c | 47 ++++++++++++++++++++++++++++++-----------------
1 file changed, 30 insertions(+), 17 deletions(-)
Index: src/lib/ecore/ecore_main.c
===================================================================
--- src/lib/ecore/ecore_main.c (revision 50585)
+++ src/lib/ecore/ecore_main.c (working copy)
@@ -138,7 +138,8 @@
#endif
}
-static inline int _ecore_poll_events_from_fdh(Ecore_Fd_Handler *fdh)
+static inline int
+_ecore_poll_events_from_fdh(Ecore_Fd_Handler *fdh)
{
int events = 0;
#ifdef HAVE_EPOLL
@@ -149,7 +150,8 @@
return events;
}
-static inline int _ecore_main_fdh_epoll_add(Ecore_Fd_Handler *fdh)
+static inline int
+_ecore_main_fdh_epoll_add(Ecore_Fd_Handler *fdh)
{
int r = 0;
#ifdef HAVE_EPOLL
@@ -163,7 +165,8 @@
return r;
}
-static inline void _ecore_main_fdh_epoll_del(Ecore_Fd_Handler *fdh)
+static inline void
+_ecore_main_fdh_epoll_del(Ecore_Fd_Handler *fdh)
{
#ifdef HAVE_EPOLL
struct epoll_event ev;
@@ -177,7 +180,8 @@
#endif
}
-static inline int _ecore_main_fdh_epoll_modify(Ecore_Fd_Handler *fdh)
+static inline int
+_ecore_main_fdh_epoll_modify(Ecore_Fd_Handler *fdh)
{
int r = 0;
#ifdef HAVE_EPOLL
@@ -192,7 +196,8 @@
}
#ifdef HAVE_EPOLL
-static inline int _ecore_main_fdh_epoll_mark_active(void)
+static inline int
+_ecore_main_fdh_epoll_mark_active(void)
{
const int num_epoll_fds = 10;
struct epoll_event ev[num_epoll_fds];
@@ -206,7 +211,7 @@
return -1;
}
- for (i=0; i<ret; i++)
+ for (i = 0; i < ret; i++)
{
Ecore_Fd_Handler *fdh = ev[i].data.ptr;
@@ -376,7 +381,7 @@
fdh->flags = flags;
if (0 > _ecore_main_fdh_epoll_add(fdh))
{
- ERR("Failed to add epoll fd %d!", fd);
+ ERR("Failed to add epoll fd %d (errno = %d)!", fd, errno);
free(fdh);
return NULL;
}
@@ -589,6 +594,23 @@
#endif
}
+static void
+_ecore_main_prepare_handlers(void)
+{
+ Ecore_Fd_Handler *fdh;
+
+ /* call the prepare callback for all handlers */
+ EINA_INLIST_FOREACH(fd_handlers, fdh)
+ {
+ if (!fdh->delete_me && fdh->prep_func)
+ {
+ fdh->references++;
+ fdh->prep_func (fdh->prep_data, fdh);
+ fdh->references--;
+ }
+ }
+}
+
static int
_ecore_main_select(double timeout)
{
@@ -626,19 +648,10 @@
FD_ZERO(&wfds);
FD_ZERO(&exfds);
- /* call the prepare callback for all handlers */
+ _ecore_main_prepare_handlers();
#ifndef HAVE_EPOLL
EINA_INLIST_FOREACH(fd_handlers, fdh)
{
- if (!fdh->delete_me && fdh->prep_func)
- {
- fdh->references++;
- fdh->prep_func (fdh->prep_data, fdh);
- fdh->references--;
- }
- }
- EINA_INLIST_FOREACH(fd_handlers, fdh)
- {
if (!fdh->delete_me)
{
if (fdh->flags & ECORE_FD_READ)
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel