EventHub code cleanup.

Use epoll_wait() instead of poll().
Dropped all support for non-Linux platforms.
Added a wake-up protocol so that the InputReader can wake up
the event loop immediately as needed.

Change-Id: Ibf84337bcceb3c2df068c5c637de42a319786d66
This commit is contained in:
Jeff Brown
2011-06-14 17:09:25 -07:00
parent c391a9888c
commit 93fa9b30b9
4 changed files with 347 additions and 314 deletions

View File

@@ -488,7 +488,7 @@ void InputReader::configure(bool firstTime) {
mEventHub->setExcludedDevices(mConfig.excludedDeviceNames);
if (!firstTime) {
mEventHub->reopenDevices();
mEventHub->requestReopenDevices();
}
}
@@ -711,6 +711,8 @@ bool InputReader::markSupportedKeyCodes(int32_t deviceId, uint32_t sourceMask, s
void InputReader::refreshConfiguration() {
android_atomic_release_store(1, &mRefreshConfiguration);
mEventHub->wake();
}
void InputReader::dump(String8& dump) {