1
2
3Mesa Threads README
4-------------------
5
6Thread safety was introduced in Mesa 2.6 by John Stone and
7Christoph Poliwoda.
8
9It was redesigned in Mesa 3.3 so that thread safety is
10supported by default (on systems which support threads,
11that is).  There is no measurable penalty on single
12threaded applications.
13
14NOTE that the only _driver_ which is thread safe at this time
15is the OS/Mesa driver!
16
17
18At present the mthreads code supports three thread APIS:
19  1) POSIX threads (aka pthreads).
20  2) Solaris / Unix International threads.
21  3) Win32 threads (Win 95/NT).
22
23Support for other thread libraries can be added src/glthread.[ch]
24
25
26In order to guarantee proper operation, it is
27necessary for both Mesa and application code to use the same threads API.
28So, if your application uses Sun's thread API, then you should build Mesa
29using one of the targets for Sun threads.
30
31The mtdemos directory contains some example programs which use
32multiple threads to render to osmesa rendering context(s).
33
34Linux users should be aware that there exist many different POSIX
35threads packages. The best solution is the linuxthreads package
36(http://pauillac.inria.fr/~xleroy/linuxthreads/) as this package is the
37only one that really supports multiprocessor machines (AFAIK). See
38http://pauillac.inria.fr/~xleroy/linuxthreads/README for further
39information about the usage of linuxthreads.
40
41If you are interested in helping with thread safety work in Mesa
42join the Mesa developers mailing list and post your proposal.
43
44
45Regards,
46  John Stone           -- j.stone@acm.org  johns@cs.umr.edu
47  Christoph Poliwoda   -- poliwoda@volumegraphics.com
48
49
50Version info:
51   Mesa 2.6 - initial thread support.
52   Mesa 3.3 - thread support mostly rewritten (Brian Paul)
53