Minor performance fix: Change the contract on XCBGetRequestSent so that it does not...
authorJamey Sharp <jamey@minilop.net>
Thu, 23 Feb 2006 23:29:40 +0000 (15:29 -0800)
committerJamey Sharp <jamey@minilop.net>
Thu, 23 Feb 2006 23:29:40 +0000 (15:29 -0800)
src/xcb_xlib.c
src/xcbxlib.h

index 8cc6837..61518f7 100644 (file)
 
 unsigned int XCBGetRequestSent(XCBConnection *c)
 {
-    unsigned int ret;
-    pthread_mutex_lock(&c->iolock);
-    ret = c->out.request;
-    pthread_mutex_unlock(&c->iolock);
-    return ret;
+    return c->out.request;
 }
 
 pthread_mutex_t *XCBGetIOLock(XCBConnection *c)
index e9f7140..59dd2a5 100644 (file)
@@ -31,6 +31,7 @@
 #include <pthread.h>
 #include "xcb.h"
 
+/* This function must be called with the IOLock held. */
 unsigned int XCBGetRequestSent(XCBConnection *c);
 
 pthread_mutex_t *XCBGetIOLock(XCBConnection *c);