head	1.4;
access;
symbols
	REL9_0_0:1.3
	REL9_1_ALPHA1:1.4
	REL9_0_RC1:1.3
	REL9_0_BETA4:1.3
	REL9_0_STABLE:1.3.0.8
	REL9_0_BETA3:1.3
	REL9_0_BETA2:1.3
	REL8_2_17:1.1
	REL8_3_11:1.1
	REL8_4_4:1.2
	REL9_0_BETA1:1.3
	REL9_0_ALPHA5_BRANCH:1.3.0.6
	REL9_0_ALPHA5:1.3
	REL8_2_16:1.1
	REL8_3_10:1.1
	REL8_4_3:1.2
	REL9_0_ALPHA4:1.3
	REL9_0_ALPHA4_BRANCH:1.3.0.4
	REL8_5_ALPHA3:1.3
	REL8_5_ALPHA3_BRANCH:1.3.0.2
	REL8_2_15:1.1
	REL8_3_9:1.1
	REL8_4_2:1.2
	REL8_5_ALPHA2:1.2
	REL8_5_ALPHA2_BRANCH:1.2.0.6
	REL8_2_14:1.1
	REL8_3_8:1.1
	REL8_4_1:1.2
	REL8_5_ALPHA1:1.2
	REL8_5_ALPHA1_BRANCH:1.2.0.4
	REL8_4_STABLE:1.2.0.2
	REL8_4_0:1.2
	REL8_4_RC2:1.2
	REL8_4_RC1:1.2
	REL8_4_BETA2:1.2
	REL8_4_BETA1:1.2
	REL8_2_13:1.1
	REL8_3_7:1.1
	REL8_2_12:1.1
	REL8_3_6:1.1
	REL8_2_11:1.1
	REL8_3_5:1.1
	REL8_2_10:1.1
	REL8_3_4:1.1
	REL8_2_9:1.1
	REL8_3_3:1.1
	REL8_2_8:1.1
	REL8_3_2:1.1
	REL8_2_7:1.1
	REL8_3_1:1.1
	REL8_3_STABLE:1.1.0.4
	REL8_3_0:1.1
	REL8_3_RC2:1.1
	REL8_2_6:1.1
	REL8_3_RC1:1.1
	REL8_3_BETA4:1.1
	REL8_3_BETA3:1.1
	REL8_3_BETA2:1.1
	REL8_3_BETA1:1.1
	REL8_2_5:1.1
	REL8_2_4:1.1
	REL8_2_3:1.1
	REL8_2_2:1.1
	REL8_2_1:1.1
	REL8_2_STABLE:1.1.0.2
	REL8_2_0:1.1
	REL8_2_RC1:1.1
	REL8_2_BETA3:1.1
	REL8_2_BETA2:1.1
	REL8_2_BETA1:1.1;
locks; strict;
comment	@# @;


1.4
date	2010.08.19.05.57.35;	author petere;	state Exp;
branches;
next	1.3;

1.3
date	2009.12.02.14.07.26;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	2008.03.21.13.23.29;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	2006.02.04.01.00.02;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Remove extra newlines at end and beginning of files, add missing newlines
at end of files.
@
text
@$PostgreSQL: pgsql/src/test/thread/README,v 1.3 2009/12/02 14:07:26 momjian Exp $

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 \
    -lwsock32 \
    -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.
@


1.3
log
@thread-safety

Apply full patch to enable thread-safety by default, e.g. doc changes.
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/src/test/thread/README,v 1.2 2008/03/21 13:23:29 momjian Exp $
a54 1

@


1.2
log
@More README src cleanups.
@
text
@d1 1
a1 1
$PostgreSQL: pgsql/src/backend/access/gin/README,v 1.5 2008/03/20 17:55:14 momjian Exp $
d6 2
a7 2
This program should be run by developers wishing to enable threading on
new platforms.
d9 3
a11 2
Run thread_test program to determine if your native libc functions are
thread-safe, or if we should use *_r functions or thread locking.
d13 1
a13 1
To use this program, you must:
d15 1
a15 1
	o run "configure --enable-thread-safety"
@


1.1
log
@Move thread_test directory from /tools to /test so source-only tarballs
have the directory for the configure test.
@
text
@d1 5
@

