[PATCH 2/5] Xext: typedef QueryValue and BracketValue prototypes

Peter Hutterer peter.hutterer at who-t.net
Mon Mar 12 16:20:33 PDT 2012


No functional changes, just for readability

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 Xext/sync.c    |    7 ++-----
 Xext/syncsrv.h |   26 ++++++++++----------------
 2 files changed, 12 insertions(+), 21 deletions(-)

diff --git a/Xext/sync.c b/Xext/sync.c
index 23360f0..002d40e 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -975,11 +975,8 @@ SyncCreateSystemCounter(
 	CARD64 initial,
 	CARD64 resolution,
 	SyncCounterType counterType,
-	void (*QueryValue)(pointer /* pCounter */,
-	      	           CARD64 * /* pValue_return */),
-	void (*BracketValues)(pointer /* pCounter */,
-	       	              CARD64 * /* pbracket_less */,
-	                      CARD64 * /* pbracket_greater */)
+	SyncSystemCounterQueryValue QueryValue,
+	SyncSystemCounterBracketValues BracketValues
 	)
 {
     SyncCounter    *pCounter;
diff --git a/Xext/syncsrv.h b/Xext/syncsrv.h
index 0e3c032..431dec3 100644
--- a/Xext/syncsrv.h
+++ b/Xext/syncsrv.h
@@ -65,21 +65,20 @@ typedef enum {
     XSyncCounterUnrestricted
 } SyncCounterType;
 
+typedef void (*SyncSystemCounterQueryValue)(pointer counter,
+					    CARD64 *value_return);
+typedef void (*SyncSystemCounterBracketValues)(pointer counter,
+					       CARD64 *pbracket_less,
+					       CARD64 *pbracket_greater);
+
 typedef struct _SysCounterInfo {
     const char	*name;
     CARD64	resolution;
     CARD64	bracket_greater;
     CARD64	bracket_less;
     SyncCounterType counterType;  /* how can this counter change */
-    void        (*QueryValue)(
-			      pointer /*pCounter*/,
-			      CARD64 * /*freshvalue*/
-);
-    void	(*BracketValues)(
-				 pointer /*pCounter*/,
-				 CARD64 * /*lessthan*/,
-				 CARD64 * /*greaterthan*/
-);
+    SyncSystemCounterQueryValue QueryValue;
+    SyncSystemCounterBracketValues BracketValues;
 } SysCounterInfo;
 
 
@@ -122,13 +121,8 @@ extern pointer SyncCreateSystemCounter(
     CARD64  	/* inital_value */,
     CARD64  	/* resolution */,
     SyncCounterType /* change characterization */,
-    void        (* /*QueryValue*/ ) (
-        pointer /* pCounter */,
-        CARD64 * /* pValue_return */), /* XXX prototype */
-    void        (* /*BracketValues*/) (
-        pointer /* pCounter */, 
-        CARD64 * /* pbracket_less */,
-        CARD64 * /* pbracket_greater */)
+    SyncSystemCounterQueryValue QueryValue,
+    SyncSystemCounterBracketValues BracketValues
 );
 
 extern void SyncChangeCounter(
-- 
1.7.7.6



More information about the xorg-devel mailing list