6 This program should be run by developers wishing to enable threading on
9 Run thread_test program to determine if your native libc functions are
10 thread-safe, or if we should use *_r functions or thread locking.
12 To use this program, you must:
14 o run "configure --enable-thread-safety"
15 o compile the main source tree
16 o compile and run this program
18 If your platform requires special thread flags that are not tested by
19 /config/acx_pthread.m4, add PTHREAD_CFLAGS and PTHREAD_LIBS defines to
20 your template/${port} file.
25 Windows systems do not vary in their thread-safeness in the same way that
26 other systems might, nor do they generally have pthreads installed, hence
27 on Windows this test is skipped by the configure program (pthreads is
28 required by the test program, but not PostgreSQL itself). If you do wish
29 to test your system however, you can do so as follows:
31 1) Install pthreads in you Mingw/Msys environment. You can download pthreads
32 from ftp://sources.redhat.com/pub/pthreads-win32/.
34 2) Build the test program:
36 gcc -o thread_test.exe \
39 -D_POSIX_PTHREAD_SEMANTICS \
40 -I../../../src/include/port/win32 \
45 3) Run thread_test.exe. You should see output like:
47 dpage@PC30:/cvs/pgsql/src/tools/thread$ ./thread_test
48 Your GetLastError() is thread-safe.
49 Your system uses strerror() which is thread-safe.
50 getpwuid_r()/getpwuid() are not applicable to Win32 platforms.
51 Your system uses gethostbyname which is thread-safe.
53 Your platform is thread-safe.