diff options
author | koron393 <koron393@gmail.com> | 2019-09-16 01:19:12 +0900 |
---|---|---|
committer | Arian <arian.kulmer@web.de> | 2020-02-07 20:09:45 +0100 |
commit | 6916d01731616972f4476a72c5b64fc9e883f929 (patch) | |
tree | 4db089d7cd588c8718fc06e80b29757247242d13 /libshims/include/utils/Looper.h | |
parent | 23345306d57c8fa5950933c6cefafbcaed31a935 (diff) |
shinano-common: libshim_camera: Update sources to Q
* Copy from Q framework sources.
Change-Id: I5b1998ce1834e825dad70f09bc8f6ab3d8e059e6
Signed-off-by: koron393 <koron393@gmail.com>
Diffstat (limited to 'libshims/include/utils/Looper.h')
-rw-r--r-- | libshims/include/utils/Looper.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libshims/include/utils/Looper.h b/libshims/include/utils/Looper.h index a62e67f..c439c5c 100644 --- a/libshims/include/utils/Looper.h +++ b/libshims/include/utils/Looper.h @@ -24,6 +24,8 @@ #include <sys/epoll.h> +#include <android-base/unique_fd.h> + namespace android { /* @@ -262,7 +264,7 @@ public: */ int pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outData); inline int pollOnce(int timeoutMillis) { - return pollOnce(timeoutMillis, NULL, NULL, NULL); + return pollOnce(timeoutMillis, nullptr, nullptr, nullptr); } /** @@ -272,7 +274,7 @@ public: */ int pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outData); inline int pollAll(int timeoutMillis) { - return pollAll(timeoutMillis, NULL, NULL, NULL); + return pollAll(timeoutMillis, nullptr, nullptr, nullptr); } /** @@ -447,7 +449,7 @@ private: const bool mAllowNonCallbacks; // immutable - int mWakeEventFd; // immutable + android::base::unique_fd mWakeEventFd; // immutable Mutex mLock; Vector<MessageEnvelope> mMessageEnvelopes; // guarded by mLock @@ -457,7 +459,7 @@ private: // any use of it is racy anyway. volatile bool mPolling; - int mEpollFd; // guarded by mLock but only modified on the looper thread + android::base::unique_fd mEpollFd; // guarded by mLock but only modified on the looper thread bool mEpollRebuildRequired; // guarded by mLock // Locked list of file descriptor monitoring requests. |