Use EPOLLWAKEUP properly.

We were trying to use it only when it wasn't supported.

Bug: 19937342
Change-Id: Id35aef9ad84f101f7ada2eb87fb91e5c5e2b3357
This commit is contained in:
Tim Kilbourn 2015-03-26 14:12:42 -07:00
parent 5b20fd0882
commit 3447df165f

View File

@ -1293,7 +1293,10 @@ status_t EventHub::openDeviceLocked(const char *devicePath) {
// Register with epoll.
struct epoll_event eventItem;
memset(&eventItem, 0, sizeof(eventItem));
eventItem.events = mUsingEpollWakeup ? EPOLLIN : EPOLLIN | EPOLLWAKEUP;
eventItem.events = EPOLLIN;
if (mUsingEpollWakeup) {
eventItem.events |= EPOLLWAKEUP;
}
eventItem.data.u32 = deviceId;
if (epoll_ctl(mEpollFd, EPOLL_CTL_ADD, fd, &eventItem)) {
ALOGE("Could not add device fd to epoll instance. errno=%d", errno);