From ba607d53c6a94ea8c4c12571980c4ad159af308b Mon Sep 17 00:00:00 2001 From: Jesse Hall Date: Mon, 1 Oct 2012 14:05:20 -0700 Subject: Add Fence::waitForever which logs a warning timeout, and use it Bug: 7217641 Change-Id: If0c1a613ead307c4045a47824174bf40c72bc7d7 --- include/ui/Fence.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') 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 }; -- cgit v1.1