2 <title>Graphical modules</title>
4 <title>GDI Module</title>
7 <title>X Windows System interface</title>
10 The X libraries used to implement X clients (such as Wine)
11 do not work properly if multiple threads access the same
12 display concurrently. It is possible to compile the X
13 libraries to perform their own synchronization (initiated
14 by calling <function>XInitThreads()</function>). However,
15 Wine does not use this approach. Instead Wine performs its
16 own synchronization using the
17 <function>wine_tsx11_lock()</function> / <function>wine_tsx11_unlock()</function>
18 functions. This locking protects library access
19 with a critical section, and also arranges things so that
20 X libraries compiled without <option>-D_REENTRANT</option>
21 (eg. with global <varname>errno</varname> variable) will
25 In the past, all calls to X used to go through a wrapper called
26 <function>TSX...()</function> (for "Thread Safe X ...").
27 While it is still being used in the code, it's inefficient
28 as the lock is potentially aquired and released unnecessarily.
29 New code should explicitly aquire the lock.
35 <!-- Keep this comment at the end of the file
38 sgml-parent-document:("wine-devel.sgml" "set" "book" "part" "chapter" "")