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