Tree [2f7a30] snap-2003-08-15 /
History



File Date Author Commit
tests 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
ANNOUNCE 2003-08-14 rpj rpj [2f7a30] Updated for snapshot release.
BUGS 2002-03-02 rpj rpj [3e1979] Made Item 1 description more accurate.
CONTRIBUTORS 2003-08-14 rpj rpj [2f7a30] Updated for snapshot release.
COPYING 2002-01-04 rpj rpj [692236] * attr.c (pthread_attr_setscope): Add m...
COPYING.LIB 2001-12-18 rpj rpj [f3cbc4] Include an interim complete Copyright notice in...
ChangeLog 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
FAQ 2002-03-02 rpj rpj [d14156] Changes to documentation and makefiles.
GNUmakefile 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
MAINTAINERS 1999-08-12 rpj rpj [9af51e] Merged patches to main trunk.
Makefile 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
NEWS 2003-08-14 rpj rpj [2f7a30] Updated for snapshot release.
Nmakefile 2002-02-23 rpj rpj [d2b870] * pthread_cond_destroy.c: Expand the ti...
Nmakefile.tests 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
PROGRESS 2002-03-02 rpj rpj [d14156] Changes to documentation and makefiles.
README 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
README.CV 2002-02-11 rpj rpj [e6f179] Splitting files. See ChangeLog file for details.
README.NONPORTABLE 2003-08-14 rpj rpj [ebd16f] Minor edit.
README.WinCE 2000-07-25 rpj rpj [e2fd6e] 2000-07-25 Ross Johnson <rpj@special.ise.canb...
TODO 2002-03-02 rpj rpj [d14156] Changes to documentation and makefiles.
WinCE-PORT 2000-08-17 rpj rpj [a366b6] 2000-08-17 Ross Johnson <rpj@special.ise.canb...
attr.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
barrier.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
cancel.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
cleanup.c 2002-02-08 rpj rpj [b29903] Copyright notice updates; module splitting; POS...
condvar.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
config.h 2002-02-08 rpj rpj [b29903] Copyright notice updates; module splitting; POS...
create.c 2002-02-08 rpj rpj [b29903] Copyright notice updates; module splitting; POS...
dll.c 2002-02-08 rpj rpj [b29903] Copyright notice updates; module splitting; POS...
errno.c 2002-03-02 rpj rpj [44c245] * errno.c: Compiler directive was incor...
exit.c 2002-02-27 rpj rpj [8200f6] * exception3.c (terminateFunction): For...
fork.c 2002-02-08 rpj rpj [b29903] Copyright notice updates; module splitting; POS...
global.c 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
implement.h 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
misc.c 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
mutex.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
need_errno.h 2000-08-14 rpj rpj [16cb1b] 2000-08-13 Ross Johnson <rpj@special.ise.canb...
nonportable.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
private.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread.c 2002-02-23 rpj rpj [d2b870] * pthread_cond_destroy.c: Expand the ti...
pthread.dsp 2003-05-14 rpj rpj [47c236] Fix compiler flag in Visual Studio project file.
pthread.dsw 2002-02-11 rpj rpj [e6f179] Splitting files. See ChangeLog file for details.
pthread.h 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
pthread_attr_destroy.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_attr_getdetachstate.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_attr_getinheritsched.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_attr_getschedparam.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_attr_getschedpolicy.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_attr_getscope.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_attr_getstackaddr.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_attr_getstacksize.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_attr_init.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_attr_setdetachstate.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_attr_setinheritsched.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_attr_setschedparam.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_attr_setschedpolicy.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_attr_setscope.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_attr_setstackaddr.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_attr_setstacksize.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_barrier_destroy.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_barrier_init.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_barrier_wait.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_barrierattr_destroy.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_barrierattr_getpshared.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_barrierattr_init.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_barrierattr_setpshared.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_cancel.c 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
pthread_cond_destroy.c 2002-09-20 rpj rpj [5ef5ad] 2002-09-20 Michael Johnson <michaelj@maine.rr...
pthread_cond_init.c 2002-02-20 rpj rpj [0bd90e] implement.h: Refine use of _LPLONG and _LONG.
pthread_cond_signal.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_cond_wait.c 2002-07-30 rpj rpj [d9bad6] * pthread_cond_wait.c (ptw32_cond_wait_cleanup):
pthread_condattr_destroy.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_condattr_getpshared.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_condattr_init.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_condattr_setpshared.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_delay_np.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_detach.c 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
pthread_equal.c 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
pthread_exit.c 2002-02-27 rpj rpj [8200f6] * exception3.c (terminateFunction): For...
pthread_getconcurrency.c 2002-02-11 rpj rpj [e6f179] Splitting files. See ChangeLog file for details.
pthread_getschedparam.c 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
pthread_getspecific.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_getw32threadhandle_np.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_join.c 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
pthread_key_create.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_key_delete.c 2002-02-23 rpj rpj [d2b870] * pthread_cond_destroy.c: Expand the ti...
pthread_kill.c 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
pthread_mutex_destroy.c 2003-06-21 rpj rpj [4ab4ca] pthread_mutex_destroy.c (pthread_mutex_destroy)...
pthread_mutex_init.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_mutex_lock.c 2003-03-04 rpj rpj [efd775] Indenting.
pthread_mutex_timedlock.c 2003-03-04 rpj rpj [26fb4c] * pthread_mutex_timedlock.c (pthread_mu...
pthread_mutex_trylock.c 2002-12-11 rpj rpj [52c104] 2002-12-11 Thomas Pfaff <tpfaff@gmx.net>
pthread_mutex_unlock.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_mutexattr_destroy.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_mutexattr_getkind_np.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_mutexattr_getpshared.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_mutexattr_gettype.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_mutexattr_init.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_mutexattr_setkind_np.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_mutexattr_setpshared.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_mutexattr_settype.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_num_processors_np.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_once.c 2002-02-11 rpj rpj [e6f179] Splitting files. See ChangeLog file for details.
pthread_rwlock_destroy.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_rwlock_init.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_rwlock_rdlock.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_rwlock_timedrdlock.c 2002-02-23 rpj rpj [6b1e90] New functions from POSIX 1003.1 2001. Untested.
pthread_rwlock_timedwrlock.c 2002-02-23 rpj rpj [6b1e90] New functions from POSIX 1003.1 2001. Untested.
pthread_rwlock_tryrdlock.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_rwlock_trywrlock.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_rwlock_unlock.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_rwlock_wrlock.c 2002-02-23 rpj rpj [d2b870] * pthread_cond_destroy.c: Expand the ti...
pthread_rwlockattr_destroy.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_rwlockattr_getpshared.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_rwlockattr_init.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_rwlockattr_setpshared.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_self.c 2002-02-11 rpj rpj [e6f179] Splitting files. See ChangeLog file for details.
pthread_setcancelstate.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_setcanceltype.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_setconcurrency.c 2002-02-11 rpj rpj [e6f179] Splitting files. See ChangeLog file for details.
pthread_setschedparam.c 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
pthread_setspecific.c 2003-05-15 rpj rpj [4b7946] Fixed memory leaks caused by destructors callin...
pthread_spin_destroy.c 2003-06-27 rpj rpj [a250b0] Free the spinlock struct in ALL appropriate cases.
pthread_spin_init.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_spin_lock.c 2003-08-13 rpj rpj [414f4b] Bug fixes plus adaptation to current MinGW/Msys...
pthread_spin_trylock.c 2003-08-13 rpj rpj [414f4b] Bug fixes plus adaptation to current MinGW/Msys...
pthread_spin_unlock.c 2003-08-13 rpj rpj [414f4b] Bug fixes plus adaptation to current MinGW/Msys...
pthread_testcancel.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_timechange_handler_np.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
pthread_win32_attach_detach_np.c 2003-05-15 rpj rpj [4b7946] Fixed memory leaks caused by destructors callin...
ptw32_InterlockedCompareExchange.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
ptw32_callUserDestroyRoutines.c 2003-08-13 rpj rpj [414f4b] Bug fixes plus adaptation to current MinGW/Msys...
ptw32_calloc.c 2002-02-11 rpj rpj [e6f179] Splitting files. See ChangeLog file for details.
ptw32_cond_check_need_init.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
ptw32_decrease_semaphore.c 2002-07-30 rpj rpj [d9bad6] * pthread_cond_wait.c (ptw32_cond_wait_cleanup):
ptw32_getprocessors.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
ptw32_increase_semaphore.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
ptw32_is_attr.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
ptw32_mutex_check_need_init.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
ptw32_new.c 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
ptw32_processInitialize.c 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
ptw32_processTerminate.c 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
ptw32_reuse.c 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
ptw32_rwlock_cancelwrwait.c 2002-02-23 rpj rpj [83c386] Add missing file.
ptw32_rwlock_check_need_init.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
ptw32_spinlock_check_need_init.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
ptw32_threadDestroy.c 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
ptw32_threadStart.c 2003-08-13 rpj rpj [414f4b] Bug fixes plus adaptation to current MinGW/Msys...
ptw32_throw.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
ptw32_timespec.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
ptw32_tkAssocCreate.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
ptw32_tkAssocDestroy.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
rwlock.c 2002-02-23 rpj rpj [d2b870] * pthread_cond_destroy.c: Expand the ti...
sched.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
sched.h 2002-03-02 rpj rpj [44c245] * errno.c: Compiler directive was incor...
sched_get_priority_max.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
sched_get_priority_min.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
sched_getscheduler.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
sched_setscheduler.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
sched_yield.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
sem_close.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
sem_destroy.c 2003-08-13 rpj rpj [414f4b] Bug fixes plus adaptation to current MinGW/Msys...
sem_getvalue.c 2002-07-30 rpj rpj [d9bad6] * pthread_cond_wait.c (ptw32_cond_wait_cleanup):
sem_init.c 2003-08-13 rpj rpj [414f4b] Bug fixes plus adaptation to current MinGW/Msys...
sem_open.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
sem_post.c 2002-06-04 rpj rpj [7e2e92] Another attempt to get sem_getvalue working.
sem_post_multiple.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
sem_timedwait.c 2002-07-30 rpj rpj [d9bad6] * pthread_cond_wait.c (ptw32_cond_wait_cleanup):
sem_trywait.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
sem_unlink.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
sem_wait.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
semaphore.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
semaphore.h 2002-03-02 rpj rpj [44c245] * errno.c: Compiler directive was incor...
signal.c 2003-08-14 rpj rpj [a50745] Reuse of thread IDs, improved thread ID validat...
spin.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
sync.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
tsd.c 2002-02-18 rpj rpj [a416ab] Major reorganisation of source code; new routin...
w32_CancelableWait.c 2002-07-30 rpj rpj [ccd0f8] * sem_timedwait.c (sem_timedwait): Tighten chec...

Read Me

PTHREADS-WIN32
==============

Pthreads-win32 is free software, distributed under the GNU Lesser
General Public License (LGPL). See the file 'COPYING.LIB' for terms
and conditions. Also see the file 'COPYING' for information
specific to pthreads-win32, copyrights and the LGPL.


What is it?
-----------

Pthreads-win32 is an Open Source Software implementation of the
Threads component of the POSIX 1003.1c 1995 Standard for Microsoft's
Win32 environment. Some functions from POSIX 1003.1b are also
supported including semaphores. Other related functions include
the set of read-write lock functions. The library also supports
some of the functionality of the Open Group's Single Unix
specification, version 2, namely mutex types.

See the file "ANNOUNCE" for more information including standards
conformance details and list of supported routines.


Which of the several dll versions to use?
-----------------------------------------
or,
---
What are all these pthread*.dll and pthread*.lib files?
-------------------------------------------------------

Simple, use either pthreadGC.* if you use GCC, or pthreadVC.* if you
use MSVC.

Otherwise, you need to choose carefully and know WHY.

The most important choice you need to make is whether to use a
version that uses exceptions internally, or not (there are versions
of the library that use exceptions as part of the thread
cancelation and exit implementation, and one that uses
setjmp/longjmp instead).

There is some contension amongst POSIX threads experts as
to how POSIX threads cancelation and exit should work
with languages that include exceptions and handlers, e.g.
C++ and even C (Microsoft's Structured Exceptions).

The issue is: should cancelation of a thread in, say,
a C++ application cause object destructors and C++ exception
handlers to be invoked as the stack unwinds during thread
exit, or not?

There seems to be more opinion in favour of using the
standard C version of the library (no EH) with C++ applications
since this appears to be the assumption commercial pthreads
implementations make. Therefore, if you use an EH version
of pthreads-win32 then you may be under the illusion that
your application will be portable, when in fact it is likely to
behave differently when linked with other pthreads libraries.

Now you may be asking: then why have you kept the EH versions of
the library?

There are a couple of reasons:
- there is division amongst the experts and so the code may
  be needed in the future. (Yes, it's in the repository and we
  can get it out anytime in the future, but ...)
- pthreads-win32 is one of the few implementations, and possibly
  the only freely available one, that has EH versions. It may be
  useful to people who want to play with or study application
  behaviour under these conditions.

Finally, for a proper version of the library with no internal
exceptions to be usable with C++ applications, the C version
should be compiled as C++ so that it knows about and can propagate
exceptions even if it doesn't use C++ features.


Notes:

[If you use either pthreadVCE or pthreadGCE]

1. [See also the discussion in the FAQ file - Q2, Q4, and Q5]

If your application contains catch(...) blocks in your POSIX
threads then you will need to replace the "catch(...)" with the macro
"PtW32Catch", eg.

	#ifdef PtW32Catch
		PtW32Catch {
			...
		}
	#else
		catch(...) {
			...
		}
	#endif

Otherwise neither pthreads cancelation nor pthread_exit() will work
reliably when using versions of the library that use C++ exceptions
for cancelation and thread exit.

This is due to what is believed to be a C++ compliance error in VC++
whereby you may not have multiple handlers for the same exception in
the same try/catch block. GNU G++ doesn't have this restriction.


Library naming
--------------

Because the library is being built using various exception
handling schemes and compilers - and because the library
may not work reliably if these are mixed in an application,
each different version of the library has it's own name.

Note 1: the incompatibility is really between EH implementations
of the different compilers. It should be possible to use the
standard C version from either compiler with C++ applications
built with a different compiler. If you use an EH version of
the library, then you must use the same compiler for the
application. This is another complication and dependency that
can be avoided by using only the standard C library version.

Note 2: if you use a standard C pthread*.dll with a C++
application, then any functions that you define that are
intended to be called via pthread_cleanup_push() must be
__cdecl.

Note 3: the intention is to also name either the VC or GC
version (it should be arbitrary) as pthread.dll, including
pthread.lib and libpthread.a as appropriate.

In general:
	pthread[VG]{SE,CE,C}.dll
	pthread[VG]{SE,CE,C}.lib

where:
	[VG] indicates the compiler
	V	- MS VC
	G	- GNU C

	{SE,CE,C} indicates the exception handling scheme
	SE	- Structured EH
	CE	- C++ EH
	C	- no exceptions - uses setjmp/longjmp

For example:
	pthreadVSE.dll	(MSVC/SEH)
	pthreadGCE.dll	(GNUC/C++ EH)
	pthreadGC.dll	(GNUC/not dependent on exceptions)

The GNU library archive file names have changed to:

	libpthreadGCE.a
	libpthreadGC.a


Other name changes
------------------

All snapshots prior to and including snapshot 2000-08-13
used "_pthread_" as the prefix to library internal
functions, and "_PTHREAD_" to many library internal
macros. These have now been changed to "ptw32_" and "PTW32_"
respectively so as to not conflict with the ANSI standard's
reservation of identifiers beginning with "_" and "__" for
use by compiler implementations only.

If you have written any applications and you are linking
statically with the pthreads-win32 library then you may have
included a call to _pthread_processInitialize. You will
now have to change that to ptw32_processInitialize.


Cleanup code default style
--------------------------

Previously, if not defined, the cleanup style was determined automatically
from the compiler used, and one of the following was defined accordingly:

	__CLEANUP_SEH	MSVC only
	__CLEANUP_CXX	C++, including MSVC++, GNU G++
	__CLEANUP_C	C, including GNU GCC, not MSVC

These defines determine the style of cleanup (see pthread.h) and,
most importantly, the way that cancelation and thread exit (via
pthread_exit) is performed (see the routine ptw32_throw() in private.c).

In short, the exceptions versions of the library throw an exception
when a thread is canceled or exits (via pthread_exit()), which is
caught by a handler in the thread startup routine, so that the
the correct stack unwinding occurs regardless of where the thread
is when it's canceled or exits via pthread_exit().

In this snapshot, unless the build explicitly defines (e.g. via a
compiler option) __CLEANUP_SEH, __CLEANUP_CXX, or __CLEANUP_C, then
the build NOW always defaults to __CLEANUP_C style cleanup. This style
uses setjmp/longjmp in the cancelation and pthread_exit implementations,
and therefore won't do stack unwinding even when linked to applications
that have it (e.g. C++ apps). This is for consistency with most/all
commercial Unix POSIX threads implementations.

Although it was not clearly documented before, it is still necessary to
build your application using the same __CLEANUP_* define as was
used for the version of the library that you link with, so that the
correct parts of pthread.h are included. That is, the possible
defines require the following library versions:

	__CLEANUP_SEH	pthreadVSE.dll
	__CLEANUP_CXX	pthreadVCE.dll or pthreadGCE.dll
	__CLEANUP_C	pthreadVC.dll or pthreadGC.dll

THE POINT OF ALL THIS IS: if you have not been defining one of these
explicitly, then the defaults as described at the top of this
section were being used.

THIS NOW CHANGES, as has been explained above, but to try to make this
clearer here's an example:

If you were building your application with MSVC++ i.e. using C++
exceptions (rather than SEH) and not explicitly defining one of
__CLEANUP_*, then __CLEANUP_C++ was defined for you in pthread.h.
You should have been linking with pthreadVCE.dll, which does
stack unwinding.

If you now build your application as you had before, pthread.h will now
set __CLEANUP_C as the default style, and you will need to link
with pthreadVC.dll. Stack unwinding will now NOT occur when a thread
is canceled, or the thread calls pthread_exit().

Your application will now most likely behave differently to previous
versions, and in non-obvious ways. Most likely is that locally
instantiated objects may not be destroyed or cleaned up after a thread
is canceled.

If you want the same behaviour as before, then you must now define
__CLEANUP_C++ explicitly using a compiler option and link with
pthreadVCE.dll as you did before.


WHY ARE WE MAKING THE DEFAULT STYLE LESS EXCEPTION-FRIENDLY?
Because no commercial Unix POSIX threads implementation allows you to
choose to have stack unwinding. Therefore, providing it in pthread-win32
as a default is dangerous. We still provide the choice but unless
you consciously choose to do otherwise, your pthreads applications will
now run or crash in similar ways irrespective of the threads platform
you use. Or at least this is the hope.



Building under VC++ using C++ EH, Structured EH, or just C
----------------------------------------------------------

From the source directory run one of the following:

nmake clean VCE (builds the VC++ C++ EH version pthreadVCE.dll)

or:

nmake clean VSE (builds the VC++ structured EH version pthreadVSE.dll)

or:

nmake clean VC	(builds the VC setjmp/longjmp version of pthreadVC.dll)

You can run the testsuite by changing to the "tests" directory and
running the target corresponding to the DLL version you built:

nmake clean VCE

or:

nmake clean VSE

or:

nmake clean VC

or:

nmake clean VCX (tests the VC version of the library with C++ (EH)
			 applications)


Building under Mingw32
----------------------

The dll can be built with Mingw32 gcc-2.95.2-1 after you've
made the changes to Mingw32 desribed in Question 6 of the FAQ.

From the source directory, run

make clean GCE

or:

make clean GC

You can run the testsuite by changing to the "tests" directory and
running

make clean GCE

or:

make clean GC

or:

make clean GCX	(tests the GC version of the library with C++ (EH)
			 applications)


Building the library under Cygwin
---------------------------------

Not tested by me although I think some people have done this.
Not sure how successfully though.

Cygwin is implementing it's own POSIX threads routines and these
will be the ones to use if you develop using Cygwin.


Ready to run binaries
---------------------

For convenience, the following ready-to-run files can be downloaded
from the FTP site (see under "Availability" below):

	pthread.h
	semaphore.h
	sched.h
	pthread.def
	pthreadVCE.dll	- built with MSVC++ compiler using C++ EH
	pthreadVCE.lib
	pthreadVC.dll	- built with MSVC compiler using C setjmp/longjmp
	pthreadVC.lib
	pthreadVSE.dll	- built with MSVC compiler using SEH
	pthreadVSE.lib
	pthreadGCE.dll	- built with Mingw32 G++
	pthreadGCE.a	- derived from pthreadGCE.dll
	pthreadGC.dll	- built with Mingw32 GCC
	pthreadGC.a	- derived from pthreadGC.dll

As of August 2003 pthreads-win32 is built and tested using the MinGW + MsysDTK
environment current as of that date or later. The following file MAY be needed
for older MinGW environments.
	gcc.dll 	- needed to build and run applications that use
			  pthreadGCE.dll.


Building applications with the library
--------------------------------------

Use the appropriate DLL and LIB files to match the exception handing
that you use in your application, or specifically, in your POSIX
threads. Don't mix them or neither thread cancelation nor
pthread_exit() will work reliably if at all.

If in doubt use the C (no-exceptions) versions of the library.


Building applications with GNU compilers
----------------------------------------

If you're using pthreadGCE.dll:

Use gcc-2.95.2-1 or later modified as per pthreads-win32 FAQ question 11.

With the three header files, pthreadGCE.dll, gcc.dll and libpthreadGCE.a
in the same directory as your application myapp.c, you could compile,
link and run myapp.c under Mingw32 as follows:

	gcc -x c++ -o myapp.exe myapp.c -I. -L. -lpthreadGCE
	myapp

Or put pthreadGCE.dll and gcc.dll in an appropriate directory in
your PATH, put libpthreadGCE.a in MINGW_ROOT\i386-mingw32\lib, and
put the three header files in MINGW_ROOT\i386-mingw32\include,
then use:

	gcc -x c++ -o myapp.exe myapp.c -lpthreadGCE
	myapp

If you're using pthreadGC.dll:

With the three header files, pthreadGC.dll and libpthreadGC.a in the
same directory as your application myapp.c, you could compile, link
and run myapp.c under Mingw32 as follows:

	gcc -o myapp.exe myapp.c -I. -L. -lpthreadGC
	myapp

Or put pthreadGC.dll in an appropriate directory in your PATH,
put libpthreadGC.a in MINGW_ROOT\i386-mingw32\lib, and
put the three header files in MINGW_ROOT\i386-mingw32\include,
then use:

	gcc -o myapp.exe myapp.c -lpthreadGC
	myapp


Availability
------------

The complete source code in either unbundled, self-extracting
Zip file, or tar/gzipped format can be found at:

	ftp://sources.redhat.com/pub/pthreads-win32

The pre-built DLL, export libraries and matching pthread.h can
be found at:

	ftp://sources.redhat.com/pub/pthreads-win32/dll-latest

Home page:

	http://sources.redhat.com/pthreads-win32/


Mailing list
------------

There is a mailing list for discussing pthreads on Win32.
To join, send email to:

	pthreads-win32-subscribe@sources.redhat.com

Unsubscribe by sending mail to:

	pthreads-win32-unsubscribe@sources.redhat.com


Acknowledgements
----------------

Pthreads-win32 is based substantially on a Win32 Pthreads
implementation contributed by John E. Bossom.
Many others have contributed important new code,
improvements and bug fixes. Thanks go to Alexander Terekhov
and Louis Thomas for their improvements to the implementation
of condition variables.

See the 'CONTRIBUTORS' file for the list of contributors.

As much as possible, the ChangeLog file also attributes
contributions and patches that have been incorporated
in the library.

----
Ross Johnson
<rpj@ise.canberra.edu.au>