summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2007-10-29 10:46:20 -0700
committerJamey Sharp <jamey@minilop.net>2007-11-04 13:02:35 -0800
commit2af660c2fcd15c86c66459bfc074c190ea1462e6 (patch)
treede0125c492506a70c0113c39953a377f4e793ad8
parent6e5485e0a5e3ab738becad12193e760c5fee83a4 (diff)
downloadxorg-lib-libX11-2af660c2fcd15c86c66459bfc074c190ea1462e6.tar.gz
Two threads can request sequence sync and XID fetch simultaneously.
So don't assert that they can't. This makes the Xlib/XCB implementation of _XAllocID more closely resemble the traditional Xlib version.
-rw-r--r--src/xcb_io.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/xcb_io.c b/src/xcb_io.c
index 193ee686..5f071849 100644
--- a/src/xcb_io.c
+++ b/src/xcb_io.c
@@ -282,9 +282,11 @@ XID _XAllocID(Display *dpy)
XID ret = dpy->xcb->next_xid;
dpy->xcb->next_xid = 0;
- assert(!(dpy->flags & XlibDisplayPrivSync));
- dpy->savedsynchandler = dpy->synchandler;
- dpy->flags |= XlibDisplayPrivSync;
+ if(!(dpy->flags & XlibDisplayPrivSync))
+ {
+ dpy->savedsynchandler = dpy->synchandler;
+ dpy->flags |= XlibDisplayPrivSync;
+ }
dpy->synchandler = _XIDHandler;
return ret;
}