SOURCES: libxcb-no-assert-on-lock.patch (NEW) - new

arekm arekm at pld-linux.org
Tue Nov 28 19:08:24 CET 2006


Author: arekm                        Date: Tue Nov 28 18:08:24 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- new

---- Files affected:
SOURCES:
   libxcb-no-assert-on-lock.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/libxcb-no-assert-on-lock.patch
diff -u /dev/null SOURCES/libxcb-no-assert-on-lock.patch:1.1
--- /dev/null	Tue Nov 28 19:08:24 2006
+++ SOURCES/libxcb-no-assert-on-lock.patch	Tue Nov 28 19:08:19 2006
@@ -0,0 +1,30 @@
+--- src/xcb_xlib.c.orig	2006-11-25 22:03:30.000000000 +0000
++++ src/xcb_xlib.c	2006-11-25 22:19:28.000000000 +0000
+@@ -38,18 +38,20 @@
+ void xcb_xlib_lock(xcb_connection_t *c)
+ {
+     _xcb_lock_io(c);
+-    assert(!c->xlib.lock);
+-    c->xlib.lock = 1;
+-    c->xlib.thread = pthread_self();
++    if (!c->xlib.lock) {
++        c->xlib.lock = 1;
++        c->xlib.thread = pthread_self();
++    }
+     _xcb_unlock_io(c);
+ }
+ 
+ void xcb_xlib_unlock(xcb_connection_t *c)
+ {
+     _xcb_lock_io(c);
+-    assert(c->xlib.lock);
+-    assert(pthread_equal(c->xlib.thread, pthread_self()));
+-    c->xlib.lock = 0;
+-    pthread_cond_broadcast(&c->xlib.cond);
++    if (c->xlib.lock) {
++        assert(pthread_equal(c->xlib.thread, pthread_self()));
++        c->xlib.lock = 0;
++        pthread_cond_broadcast(&c->xlib.cond);
++    }
+     _xcb_unlock_io(c);
+ }
================================================================


More information about the pld-cvs-commit mailing list