diff options
| author | Dianne Hackborn <hackbod@google.com> | 2010-09-07 16:38:45 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-07 16:38:45 -0700 |
| commit | a1205f07a6f0c745e8f42f16fe38c06af04143c7 (patch) | |
| tree | d81c4f25faa7e710d0529484f9bd39a2fcf28571 /include/utils/PollLoop.h | |
| parent | 000ef46f5b0f84d08342711b00e8de560ea504af (diff) | |
| parent | 2d3739d479d67ba736cefbdd6087a11eadfb14ea (diff) | |
| download | frameworks_base-a1205f07a6f0c745e8f42f16fe38c06af04143c7.zip frameworks_base-a1205f07a6f0c745e8f42f16fe38c06af04143c7.tar.gz frameworks_base-a1205f07a6f0c745e8f42f16fe38c06af04143c7.tar.bz2 | |
am 2d3739d4: Merge "Modify native ALooper to take an explicit ident." into gingerbread
Merge commit '2d3739d479d67ba736cefbdd6087a11eadfb14ea' into gingerbread-plus-aosp
* commit '2d3739d479d67ba736cefbdd6087a11eadfb14ea':
Modify native ALooper to take an explicit ident.
Diffstat (limited to 'include/utils/PollLoop.h')
| -rw-r--r-- | include/utils/PollLoop.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/utils/PollLoop.h b/include/utils/PollLoop.h index 81230e8..bc616eb 100644 --- a/include/utils/PollLoop.h +++ b/include/utils/PollLoop.h @@ -111,12 +111,18 @@ public: * This method can be called on any thread. * This method may block briefly if it needs to wake the poll loop. */ - void setCallback(int fd, int events, Callback callback, void* data = NULL); + void setCallback(int fd, int ident, int events, Callback callback, void* data = NULL); /** + * Convenience for above setCallback when ident is not used. In this case + * the ident is set to POLL_CALLBACK. + */ + void setCallback(int fd, int events, Callback callback, void* data = NULL); + + /** * Like setCallback(), but for the NDK callback function. */ - void setLooperCallback(int fd, int events, ALooper_callbackFunc* callback, + void setLooperCallback(int fd, int ident, int events, ALooper_callbackFunc* callback, void* data); /** @@ -153,11 +159,13 @@ private: struct RequestedCallback { Callback callback; ALooper_callbackFunc* looperCallback; + int ident; void* data; }; struct PendingCallback { int fd; + int ident; int events; Callback callback; ALooper_callbackFunc* looperCallback; @@ -185,7 +193,7 @@ private: void openWakePipe(); void closeWakePipe(); - void setCallbackCommon(int fd, int events, Callback callback, + void setCallbackCommon(int fd, int ident, int events, Callback callback, ALooper_callbackFunc* looperCallback, void* data); ssize_t getRequestIndexLocked(int fd); void wakeAndLock(); |
