[PATCH] sync: Don't allow creating a system counter before sync is initialized

Adam Jackson ajax at redhat.com
Tue Dec 8 12:08:34 PST 2015


It probably doesn't work very well since there's other extension setup
we're not doing on this path, and in any event it's not a thing that
happens currently.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 Xext/sync.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/Xext/sync.c b/Xext/sync.c
index 4140561..5a2e4e5 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -984,20 +984,7 @@ SyncCreateSystemCounter(const char *name,
                         SyncSystemCounterBracketValues BracketValues
     )
 {
-    SyncCounter *pCounter;
-
-    /* this function may be called before SYNC has been initialized, so we
-     * have to make sure RTCounter is created.
-     */
-    if (RTCounter == 0) {
-        RTCounter = CreateNewResourceType(FreeCounter, "SyncCounter");
-        if (RTCounter == 0) {
-            return NULL;
-        }
-        xorg_list_init(&SysCounterList);
-    }
-
-    pCounter = SyncCreateCounter(NULL, FakeClientID(0), initial);
+    SyncCounter *pCounter = SyncCreateCounter(NULL, FakeClientID(0), initial);
 
     if (pCounter) {
         SysCounterInfo *psci;
-- 
2.5.0



More information about the xorg-devel mailing list