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

Peter Hutterer peter.hutterer at who-t.net
Tue Mar 13 22:47:22 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>
---
 Xext/sync.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Xext/sync.c b/Xext/sync.c
index a219809..17e64e5 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -2744,7 +2744,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,
@@ -2820,7 +2820,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;
@@ -2851,13 +2851,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