diff options
author | Jesse Hall <jessehall@google.com> | 2012-10-01 14:05:20 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-02 16:29:46 -0700 |
commit | ba607d53c6a94ea8c4c12571980c4ad159af308b (patch) | |
tree | 80458eab2d99780520b25b83b5c09ea13461387c /include/ui | |
parent | 2ae7bec77093744206080dbae020edfa3bfac2e1 (diff) | |
download | frameworks_native-ba607d53c6a94ea8c4c12571980c4ad159af308b.zip frameworks_native-ba607d53c6a94ea8c4c12571980c4ad159af308b.tar.gz frameworks_native-ba607d53c6a94ea8c4c12571980c4ad159af308b.tar.bz2 |
Add Fence::waitForever which logs a warning timeout, and use it
Bug: 7217641
Change-Id: If0c1a613ead307c4045a47824174bf40c72bc7d7
Diffstat (limited to 'include/ui')
-rw-r--r-- | include/ui/Fence.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/ui/Fence.h b/include/ui/Fence.h index b516a22..a8460c2 100644 --- a/include/ui/Fence.h +++ b/include/ui/Fence.h @@ -62,6 +62,13 @@ public: // indefinitely for the fence to signal. int wait(unsigned int timeout); + // waitForever is a convenience function for waiting forever for a fence to + // signal (just like wait(TIMEOUT_NEVER)), but issuing an error to the + // system log and fence state to the kernel log if the wait lasts longer + // than warningTimeout. The logname argument should be a string identifying + // the caller and will be included in the log message. + int waitForever(unsigned int warningTimeout, const char* logname); + // TIMEOUT_NEVER may be passed to the wait method to indicate that it // should wait indefinitely for the fence to signal. enum { TIMEOUT_NEVER = -1 }; |