[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
The attached patch makes a conditional xlock in _xwin_close_display
unconditional. I assume, previously, XLock would have taken care of
releasing the underlying lock when XCloseDisplay was called in another
thread in the multithreaded case - but now we can safely use the xwin
mutex (and possibly get rid of an X11 async reply on exit).
--
Elias Pschernig
Index: src/x/xwin.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/x/xwin.c,v
retrieving revision 1.83
diff -p -u -r1.83 xwin.c
--- src/x/xwin.c 2 Dec 2004 00:07:16 -0000 1.83
+++ src/x/xwin.c 28 Jan 2005 14:31:02 -0000
@@ -304,9 +304,7 @@ void _xwin_close_display(void)
{
Display *dpy;
- if (!_unix_bg_man->multi_threaded) {
- XLOCK();
- }
+ XLOCK();
if (_xwin.display != 0) {
_xwin_destroy_window();
@@ -315,9 +313,7 @@ void _xwin_close_display(void)
XCloseDisplay(dpy);
}
- if (!_unix_bg_man->multi_threaded) {
- XUNLOCK();
- }
+ XUNLOCK();
}