EPOLLWAKEUP handling in minui/events.c

Older trees may not have EPOLLWAKEUP defined so we will work
around the lack of EPOLLWAKEUP support as best we can. This should
only maybe affect how charger handles waking up the screen in off
mode charging in older trees. No impact on TWRP itself.

Change-Id: Ia72ebfc12778b2bcda648edc27d2092c2ead415c
This commit is contained in:
Ethan Yonker
2014-12-11 10:35:52 -06:00
committed by Dees Troy
parent d5c6069287
commit 452e420a2e

View File

@@ -84,7 +84,11 @@ int ev_init(ev_callback input_cb, void *data)
continue;
}
#ifdef EPOLLWAKEUP
ev.events = EPOLLIN | EPOLLWAKEUP;
#else
ev.events = EPOLLIN;
#endif
ev.data.ptr = (void *)&ev_fdinfo[ev_count];
if (epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &ev)) {
close(fd);
@@ -118,7 +122,11 @@ int ev_add_fd(int fd, ev_callback cb, void *data)
if (ev_misc_count == MAX_MISC_FDS || cb == NULL)
return -1;
#ifdef EPOLLWAKEUP
ev.events = EPOLLIN | EPOLLWAKEUP;
#else
ev.events = EPOLLIN;
#endif
ev.data.ptr = (void *)&ev_fdinfo[ev_count];
ret = epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &ev);
if (!ret) {