summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-02-20 14:45:54 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-02-20 15:17:13 -0800
commit9bad8309ef289bb943651abf6967b24fa2252aac (patch)
tree0f8cec229c3032c329de1128804169481afe1221 /include
parentef5c446395aa30d7b1096a112e241a81c5b358e7 (diff)
flags member of Display structure needs to be marked volatile
Since the Xlib multithreaded code checks the flags variable in _XFlushInt to see if the other threads are done yet, it has to be marked volatile so the compiler doesn't optimize out re-loading it on each trip through the while loop and end up in an impossible-to-exit infinite loop of CPU chewing. Part of fix for Sun bug 6409332: infinite loop in XFlushInt() on x86/32-bit <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6409332> Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Diffstat (limited to 'include')
-rw-r--r--include/X11/Xlibint.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
index c9c12f5..4f3755f 100644
--- a/include/X11/Xlibint.h
+++ b/include/X11/Xlibint.h
@@ -108,7 +108,7 @@ struct _XDisplay
int nscreens; /* number of screens on this server*/
Screen *screens; /* pointer to list of screens */
unsigned long motion_buffer; /* size of motion buffer */
- unsigned long flags; /* internal connection flags */
+ volatile unsigned long flags; /* internal connection flags */
int min_keycode; /* minimum defined keycode */
int max_keycode; /* maximum defined keycode */
KeySym *keysyms; /* This server's keysyms */