summaryrefslogtreecommitdiffstats
path: root/include/utils
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-05-30 19:21:12 -0700
committerJeff Brown <jeffbrown@google.com>2012-05-30 19:21:12 -0700
commit588d5c8280c89c646aa7c8c54900225ee04176ea (patch)
tree677ef7ffe61f0536cbd56b1debde92ce985e284d /include/utils
parent1ea51bf519bdfc0e04daa88b8788f06105c5599b (diff)
downloadframeworks_native-588d5c8280c89c646aa7c8c54900225ee04176ea.zip
frameworks_native-588d5c8280c89c646aa7c8c54900225ee04176ea.tar.gz
frameworks_native-588d5c8280c89c646aa7c8c54900225ee04176ea.tar.bz2
Delete unused poll() code.
We don't need this code anymore and it is just in the way. Bug: 6559630 Change-Id: I1dc9decf85d5ea1feab159c2985da6c20baffdd5
Diffstat (limited to 'include/utils')
-rw-r--r--include/utils/Looper.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/include/utils/Looper.h b/include/utils/Looper.h
index 96b971e..84e3864 100644
--- a/include/utils/Looper.h
+++ b/include/utils/Looper.h
@@ -24,14 +24,7 @@
#include <android/looper.h>
-// When defined, uses epoll_wait() for polling, otherwise uses poll().
-#define LOOPER_USES_EPOLL
-
-#ifdef LOOPER_USES_EPOLL
#include <sys/epoll.h>
-#else
-#include <sys/poll.h>
-#endif
/*
* Declare a concrete type for the NDK's looper forward declaration.
@@ -310,32 +303,10 @@ private:
Vector<MessageEnvelope> mMessageEnvelopes; // guarded by mLock
bool mSendingMessage; // guarded by mLock
-#ifdef LOOPER_USES_EPOLL
int mEpollFd; // immutable
// Locked list of file descriptor monitoring requests.
KeyedVector<int, Request> mRequests; // guarded by mLock
-#else
- // The lock guards state used to track whether there is a poll() in progress and whether
- // there are any other threads waiting in wakeAndLock(). The condition variables
- // are used to transfer control among these threads such that all waiters are
- // serviced before a new poll can begin.
- // The wakeAndLock() method increments mWaiters, wakes the poll, blocks on mAwake
- // until mPolling becomes false, then decrements mWaiters again.
- // The poll() method blocks on mResume until mWaiters becomes 0, then sets
- // mPolling to true, blocks until the poll completes, then resets mPolling to false
- // and signals mResume if there are waiters.
- bool mPolling; // guarded by mLock
- uint32_t mWaiters; // guarded by mLock
- Condition mAwake; // guarded by mLock
- Condition mResume; // guarded by mLock
-
- Vector<struct pollfd> mRequestedFds; // must hold mLock and mPolling must be false to modify
- Vector<Request> mRequests; // must hold mLock and mPolling must be false to modify
-
- ssize_t getRequestIndexLocked(int fd);
- void wakeAndLock();
-#endif
// This state is only used privately by pollOnce and does not require a lock since
// it runs on a single thread.