[AD] XInitThreads

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Ok, since it seems the XLOCK/XUNLOCK removal would go to far, I guess we
should at least add the attached patch for now. It can be disabled by:

[system]
XInitThreads=0

in case it would be a performance hit - but I don't notice anything
here. In fact, since we still have our own pthread lock, the X11 calls
will always hit the uncontented case of their internal lock, which
therefore would just return without an actual futex syscall :)

So, it should do no harm, but according to Milan on the AGL list, will
be quite crucial lest we want to get many sad AGL users under X11, who
will happily try the new Allegro 4.2.1/AllegroGL 0.4.0 combo with their
Intel gfx card and only get an async reply for any Allegro program.

-- 
Elias Pschernig
Index: src/x/xsystem.c
===================================================================
--- src/x/xsystem.c	(revision 5802)
+++ src/x/xsystem.c	(working copy)
@@ -207,6 +207,9 @@
    get_executable_name(tmp, sizeof(tmp));
    set_window_title(get_filename(tmp));
 
+   if (get_config_int("system", "XInitThreads", 1))
+       XInitThreads();
+
    /* Open the display, create a window, and background-process 
     * events for it all. */
    if (_xwin_open_display(0) || _xwin_create_window()


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/