[PATCH v2 5/9] Xext: pass the counter into block/wakeup handlers

Peter Hutterer peter.hutterer at who-t.net
Wed Mar 14 21:10:26 PDT 2012


No functional changes, currently unused. Preparation work, we don't need a
global variable if we can pass the counters around anyway.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
---
 Xext/sync.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Xext/sync.c b/Xext/sync.c
index 7c9f59c..050a96e 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -2723,7 +2723,7 @@ IdleTimeQueryValue (pointer pCounter, CARD64 *pValue_return)
 }
 
 static void
-IdleTimeBlockHandler(pointer env, struct timeval **wt, pointer LastSelectMask)
+IdleTimeBlockHandler(pointer pCounter, struct timeval **wt, pointer LastSelectMask)
 {
     SyncCounter *counter = IdleTimeCounter;
     XSyncValue *less = pIdleTimeValueLess,
@@ -2799,7 +2799,7 @@ IdleTimeBlockHandler(pointer env, struct timeval **wt, pointer LastSelectMask)
 }
 
 static void
-IdleTimeWakeupHandler (pointer env, int rc, pointer LastSelectMask)
+IdleTimeWakeupHandler (pointer pCounter, int rc, pointer LastSelectMask)
 {
     SyncCounter *counter = IdleTimeCounter;
     XSyncValue idle;
@@ -2830,13 +2830,13 @@ IdleTimeBracketValues (pointer pCounter, CARD64 *pbracket_less,
     {
 	RemoveBlockAndWakeupHandlers(IdleTimeBlockHandler,
 	                             IdleTimeWakeupHandler,
-	                             NULL);
+	                             pCounter);
     }
     else if (!registered && (pbracket_less || pbracket_greater))
     {
 	RegisterBlockAndWakeupHandlers(IdleTimeBlockHandler,
 	                               IdleTimeWakeupHandler,
-	                               NULL);
+	                               pCounter);
     }
 
     pIdleTimeValueGreater = pbracket_greater;
-- 
1.7.7.6



More information about the xorg-devel mailing list