summaryrefslogtreecommitdiffstats
path: root/src/test/thread/README
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:19:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:19:15 +0000
commit6eb9c5a5657d1fe77b55cc261450f3538d35a94d (patch)
tree657d8194422a5daccecfd42d654b8a245ef7b4c8 /src/test/thread/README
parentInitial commit. (diff)
downloadpostgresql-13-upstream.tar.xz
postgresql-13-upstream.zip
Adding upstream version 13.4.upstream/13.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/thread/README')
-rw-r--r--src/test/thread/README54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/test/thread/README b/src/test/thread/README
new file mode 100644
index 0000000..4da2344
--- /dev/null
+++ b/src/test/thread/README
@@ -0,0 +1,54 @@
+src/test/thread/README
+
+Threading
+=========
+
+This program is run by configure to determine if threading is
+properly supported on the platform.
+
+You can run the program manually to see details, which shows if your
+native libc functions are thread-safe, or if we use *_r functions or
+thread locking.
+
+To use this program manually, you must:
+
+ o run "configure"
+ o compile the main source tree
+ o compile and run this program
+
+If your platform requires special thread flags that are not tested by
+/config/acx_pthread.m4, add PTHREAD_CFLAGS and PTHREAD_LIBS defines to
+your template/${port} file.
+
+Windows Systems
+===============
+
+Windows systems do not vary in their thread-safeness in the same way that
+other systems might, nor do they generally have pthreads installed, hence
+on Windows this test is skipped by the configure program (pthreads is
+required by the test program, but not PostgreSQL itself). If you do wish
+to test your system however, you can do so as follows:
+
+1) Install pthreads in you Mingw/Msys environment. You can download pthreads
+ from ftp://sources.redhat.com/pub/pthreads-win32/.
+
+2) Build the test program:
+
+ gcc -o thread_test.exe \
+ -D_REENTRANT \
+ -D_THREAD_SAFE \
+ -D_POSIX_PTHREAD_SEMANTICS \
+ -I../../../src/include/port/win32 \
+ thread_test.c \
+ -lws2_32 \
+ -lpthreadgc2
+
+3) Run thread_test.exe. You should see output like:
+
+ dpage@PC30:/cvs/pgsql/src/tools/thread$ ./thread_test
+ Your GetLastError() is thread-safe.
+ Your system uses strerror() which is thread-safe.
+ getpwuid_r()/getpwuid() are not applicable to Win32 platforms.
+ Your system uses gethostbyname which is thread-safe.
+
+ Your platform is thread-safe.