blob: fb6e0ff3d1a0d2822a88538cd84f114bc2ba0817 [file] [log] [blame]
Brian Paulbe8dd3e1999-04-10 12:25:26 +00001
Brian Paulbe8dd3e1999-04-10 12:25:26 +00002
3Mesa Threads README
4-------------------
5
Brian Paul26651d01999-12-17 15:25:14 +00006Thread 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:
Brian Paulbe8dd3e1999-04-10 12:25:26 +000019 1) POSIX threads (aka pthreads).
20 2) Solaris / Unix International threads.
21 3) Win32 threads (Win 95/NT).
22
Brian Paul26651d01999-12-17 15:25:14 +000023Support for other thread libraries can be added src/glthread.[ch]
Brian Paulbe8dd3e1999-04-10 12:25:26 +000024
Brian Paulbe8dd3e1999-04-10 12:25:26 +000025
Brian Paul26651d01999-12-17 15:25:14 +000026In order to guarantee proper operation, it is
Brian Paulbe8dd3e1999-04-10 12:25:26 +000027necessary 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
Brian Paulbe8dd3e1999-04-10 12:25:26 +000031The 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
Brian Paul26651d01999-12-17 15:25:14 +000041If you are interested in helping with thread safety work in Mesa
42join the Mesa developers mailing list and post your proposal.
Brian Paulbe8dd3e1999-04-10 12:25:26 +000043
Brian Paulbe8dd3e1999-04-10 12:25:26 +000044
45Regards,
46 John Stone -- j.stone@acm.org johns@cs.umr.edu
47 Christoph Poliwoda -- poliwoda@volumegraphics.com
48
49
Brian Paul26651d01999-12-17 15:25:14 +000050Version info:
51 Mesa 2.6 - initial thread support.
52 Mesa 3.3 - thread support mostly rewritten (Brian Paul)