this adds a small helper function for use in finding cases where the epoll fd gets deleted and calls it after each fdh function

if epoll support is not enabled, the function does nothing
this will be removed prior to actual release, but will be very useful in finding the last epoll bugs until then


SVN revision: 55791
This commit is contained in:
Mike Blumenkrantz 2011-01-01 03:07:58 +00:00
parent c730fdf95e
commit 677b5d0c73
2 changed files with 14 additions and 0 deletions

View File

@ -154,6 +154,18 @@ static gboolean ecore_idling;
static gboolean ecore_fds_ready;
#endif
void
_ecore_fd_valid(void)
{
#ifdef HAVE_EPOLL
if (fcntl(epoll_fd, F_GETFD) < 0)
{
ERR("arghhh you caught me! report a backtrace to edevel!");
sleep(5);
}
#endif
}
#ifdef HAVE_EPOLL
static inline int
_ecore_get_epoll_fd(void)
@ -1307,6 +1319,7 @@ _ecore_main_fd_handlers_call(void)
}
fdh->references--;
_ecore_fd_valid();
fdh->read_active = EINA_FALSE;
fdh->write_active = EINA_FALSE;

View File

@ -118,6 +118,7 @@ typedef unsigned int Ecore_Magic;
EAPI void _ecore_magic_fail(const void *d, Ecore_Magic m, Ecore_Magic req_m, const char *fname);
void _ecore_time_init(void);
void _ecore_fd_valid(void);
void _ecore_timer_shutdown(void);
void _ecore_timer_cleanup(void);