OSDN Git Service
(root)
/
android-x86
/
frameworks-native.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b20fd0
)
Use EPOLLWAKEUP properly.
author
Tim Kilbourn
<tkilbourn@google.com>
Thu, 26 Mar 2015 21:12:42 +0000
(14:12 -0700)
committer
Tim Kilbourn
<tkilbourn@google.com>
Thu, 26 Mar 2015 21:12:42 +0000
(14:12 -0700)
We were trying to use it only when it wasn't supported.
Bug:
19937342
Change-Id: Id35aef9ad84f101f7ada2eb87fb91e5c5e2b3357
services/inputflinger/EventHub.cpp
patch
|
blob
|
history
diff --git
a/services/inputflinger/EventHub.cpp
b/services/inputflinger/EventHub.cpp
index
93ce010
..
3135692
100644
(file)
--- a/
services/inputflinger/EventHub.cpp
+++ b/
services/inputflinger/EventHub.cpp
@@
-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);