Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Tree [0cf178] /
History



File Date Author Commit
tests 2001-02-14 rpj rpj [0cf178] Remove interdependence of mutex and cancel rout...
ANNOUNCE 2001-02-10 rpj rpj [1c38df] 2001-02-09 Ross Johnson <rpj@setup1.ise.canbe...
CONTRIBUTORS 2001-02-06 rpj rpj [25f0d9] Created experimental branch.
COPYING.LIB 1998-10-02 bje bje [74a43f] 1998-10-02 Ben Elliston <bje@cygnus.com>
ChangeLog 2001-02-13 rpj rpj [4b2662] Change the thread cancel lock to be a critical ...
FAQ 2001-02-06 rpj rpj [ced3d3] Update Question 6.
GNUmakefile 2000-12-29 rpj rpj [0c2cb3] ./ChangeLog:
MAINTAINERS 1999-08-12 rpj rpj [9af51e] Merged patches to main trunk.
Makefile 2000-12-29 rpj rpj [0c2cb3] ./ChangeLog:
Makefile.in 2000-01-04 rpj rpj [a378d9] Main changes (see ChangeLog diff for details an...
Makefile.vc 2000-01-07 rpj rpj [5cdc41] Minor changes.
NEWS 2000-08-15 rpj rpj [b05acb] New file to contain brief descriptions of chang...
PROGRESS 2001-02-06 rpj rpj [47ccfd] Update web URL.
README 2001-02-07 rpj rpj [7a31ef] Updates and minor corrections and changes.
README.CV 2001-02-06 rpj rpj [25f0d9] Created experimental branch.
README.NONPORTABLE 2001-02-09 rpj rpj [1648c7] Remodeled mutex routines again to eliminate cri...
README.WinCE 2000-07-25 rpj rpj [e2fd6e] 2000-07-25 Ross Johnson <rpj@special.ise.canb...
TODO 2000-07-25 rpj rpj [e2fd6e] 2000-07-25 Ross Johnson <rpj@special.ise.canb...
WinCE-PORT 2000-08-17 rpj rpj [a366b6] 2000-08-17 Ross Johnson <rpj@special.ise.canb...
acconfig.h 1999-08-19 rpj rpj [5e87a0] 1999-08-19 Ross Johnson <rpj@ixobrychus.canbe...
attr.c 2001-02-08 rpj rpj [2b3eed] Fixes to new mutex routines and various tests.
cancel.c 2001-02-13 rpj rpj [4b2662] Change the thread cancel lock to be a critical ...
cleanup.c 2000-08-18 rpj rpj [11eb4d] 2000-08-18 Ross Johnson <rpj@setup1.ise.canbe...
condvar.c 2001-02-07 rpj rpj [2f4a19] Revamp read-write locks and update cond vars.
config.guess 1998-09-13 bje bje [8b3277] 1998-09-13 Ben Elliston <bje@cygnus.com>
config.h 2000-12-29 rpj rpj [0c2cb3] ./ChangeLog:
config.h.in 2000-12-29 rpj rpj [0c2cb3] ./ChangeLog:
config.sub 1998-09-13 bje bje [8b3277] 1998-09-13 Ben Elliston <bje@cygnus.com>
configure 1999-10-16 rpj rpj [8c2385] 1999-10-17 Ross Johnson <rpj@ixobrychus.canbe...
configure.in 2000-01-04 rpj rpj [a378d9] Main changes (see ChangeLog diff for details an...
create.c 2001-02-13 rpj rpj [4b2662] Change the thread cancel lock to be a critical ...
dll.c 2000-12-28 rpj rpj [c94735] ./ChangeLog:
errno.c 2000-08-14 rpj rpj [16cb1b] 2000-08-13 Ross Johnson <rpj@special.ise.canb...
exit.c 2000-08-18 rpj rpj [11eb4d] 2000-08-18 Ross Johnson <rpj@setup1.ise.canbe...
fork.c 1999-03-16 rpj rpj [c5573b] Tue Mar 16 1999 Ross Johnson <rpj@ixobrychus...
global.c 2001-02-09 rpj rpj [1648c7] Remodeled mutex routines again to eliminate cri...
implement.h 2001-02-14 rpj rpj [0cf178] Remove interdependence of mutex and cancel rout...
install-sh 1998-09-13 bje bje [8b3277] 1998-09-13 Ben Elliston <bje@cygnus.com>
misc.c 2001-02-13 rpj rpj [4b2662] Change the thread cancel lock to be a critical ...
mutex.c 2001-02-14 rpj rpj [0cf178] Remove interdependence of mutex and cancel rout...
need_errno.h 2000-08-14 rpj rpj [16cb1b] 2000-08-13 Ross Johnson <rpj@special.ise.canb...
nonportable.c 2001-02-10 rpj rpj [1c38df] 2001-02-09 Ross Johnson <rpj@setup1.ise.canbe...
private.c 2001-02-13 rpj rpj [4b2662] Change the thread cancel lock to be a critical ...
pthread.def 2001-02-09 rpj rpj [1648c7] Remodeled mutex routines again to eliminate cri...
pthread.dsp 2001-01-01 rpj rpj [9171ee] Initial version of MS Developer Studio project ...
pthread.dsw 2001-01-01 rpj rpj [9171ee] Initial version of MS Developer Studio project ...
pthread.h 2001-02-10 rpj rpj [1c38df] 2001-02-09 Ross Johnson <rpj@setup1.ise.canbe...
rwlock.c 2001-02-08 rpj rpj [2b3eed] Fixes to new mutex routines and various tests.
sched.c 2001-02-08 rpj rpj [2b3eed] Fixes to new mutex routines and various tests.
sched.h 1999-11-04 rpj rpj [7fdb90] 1999-11-05 Ross Johnson <rpj@ixobrychus.canbe...
semaphore.c 2000-09-02 rpj rpj [69b6d5] 2000-09-02 Ross Johnson <rpj@special.ise.canb...
semaphore.h 2000-12-29 rpj rpj [0c2cb3] ./ChangeLog:
signal.c 2000-12-28 rpj rpj [bab189] 2000-10-10 Ross Johnson <rpj@setup1.ise.canbe...
sync.c 2000-12-29 rpj rpj [0c2cb3] ./ChangeLog:
tsd.c 2001-02-06 rpj rpj [25f0d9] Created experimental branch.

Read Me

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

Pthreads-win32 is free software, distributed under the GNU Library
General Public License (LGPL). See the file 'COPYING.LIB' for terms
and conditions.


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

Pthreads-win32 is an Open Source Software (OSS) 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.

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


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

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

In general:
	pthread[VG][SC]E.dll
	pthread[VG][SC]E.lib

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

	[SC] indicates the exception handling scheme
	S	- Structured EH
	C	- C++ EH

For example:
	pthreadVSE.dll	(VC++/SEH)
	pthreadGCE.dll	(G++/C++ EH)

The GNU library archive file name has changed to:

	libpthreadw32.a	(the "32" is now "w32")


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.


Known bugs in this snapshot
---------------------------

1. Asynchronous cancelation only works on Intel X86 machines.


Caveats
-------

1. Due to what is believed to be C++ compliance error in VC++,
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.


Building under VC++ using either C++ EH or Structured EH
--------------------------------------------------------

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)

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


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.
Hopefully versions after gcc-2.95.2-1 won't require the fix.

Run "make" in the source directory (uses GNUmakefile). This builds
pthreadGCE.dll and libpthreadw32.a.

You can run the testsuite by changing to the "tests" directory and
running "make clean" and then "make".


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
	pthreadVSE.dll	- built with MSVC compiler using SEH
	pthreadVSE.lib
	pthreadGCE.dll	- built with Mingw32 G++
	libpthreadw32.a	- derived from 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.


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

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

With pthreadGCE.dll and libpthreadw32.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. -lpthreadw32
	myapp

Or put pthreadGCE.dll in an appropriate directory in your PATH,
put libpthread32.a in MINGW_ROOT\i386-mingw32\lib, and
put pthread.h in MINGW_ROOT\i386-mingw32\include, then use:

	gcc -x c++ -o myapp.exe myapp.c -lpthreadw32
	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 <jebossom@cognos.com>.
Many others have contributed important new code and bug fixes.

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

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