summaryrefslogtreecommitdiffstats
path: root/include/utils
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-05-31 18:43:26 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-05-31 18:43:26 -0700
commitad7b3760ced1c5ca40b3641e97911803810a839b (patch)
tree70c9adc10d3d8e4c62f1627697ef8b1dbbb2e5b8 /include/utils
parent27d928474d05c8cf976d9da88be876feda7e10f3 (diff)
parent805867612c0c11d3bb494cbf454cbb2de21a1b75 (diff)
downloadframeworks_native-ad7b3760ced1c5ca40b3641e97911803810a839b.zip
frameworks_native-ad7b3760ced1c5ca40b3641e97911803810a839b.tar.gz
frameworks_native-ad7b3760ced1c5ca40b3641e97911803810a839b.tar.bz2
am 80586761: am dad23789: Merge "Delete unused poll() code." into jb-dev
* commit '805867612c0c11d3bb494cbf454cbb2de21a1b75': Delete unused poll() code.
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.