This is the mail archive of the
mailing list for the pthreas-win32 project.
New snapshot 2003-09-04
- From: Ross Johnson <rpj at callisto dot canberra dot edu dot au>
- To: pthreads-win32 at sources dot redhat dot com
- Date: Wed, 03 Sep 2003 05:24:19 +1000
- Subject: New snapshot 2003-09-04
- Reply-to: rpj at callisto dot canberra dot edu dot au
There is now a new snapshot 2003-09-04 available at:
and eventually at Red Hat mirrors - see the link on the project page at
As usual, it's available as:
- a complete self-unpacking Zip file
- tar.gz file of source files only
- separated source files
- pre-built dll and lib files with necessary include files (in the
This snapshot is primarily in response to:
This is perhaps a slightly beta snapshot although it passes the full
test suite, including new tests
for the following new feature:
New feature - Cancelation of/by Win32 (non-POSIX) threads
Since John Bossom's original implementation, the library has allowed
initialised threads (Win32 threads) to call pthreads-win32 routines and
therefore interact with POSIX threads. This is done by creating an
POSIX thread ID for the Win32 thread that, once created, allows fully
reciprical interaction. This did not extend to thread cancelation (async or
deferred). Now it does.
Any thread can be canceled by any other thread (Win32 or POSIX) if the
thread's POSIX pthread_t value is known. It's TSD destructors and POSIX
cleanup handlers will be run before the thread exits with an exit code of
PTHREAD_CANCELED (retrieved with GetExitCodeThread()).
This allows a Win32 thread to, for example, call POSIX CV routines in
the same way
that POSIX threads would/should, with pthread_cond_wait() cancelability and
cleanup handlers (pthread_cond_wait() is a POSIX cancelation point).
By adding cancelation, Win32 threads should now be able to call all POSIX
threads routines that make sense including semaphores, mutexes, condition
variables, read/write locks, barriers, spinlocks, tsd, cleanup push/pop,
cancelation, pthread_exit, scheduling, etc.
Note that these on-the-fly 'implicit' POSIX thread IDs are initialised
(not joinable) with deferred cancelation type. The POSIX thread ID will
automatically by any POSIX routines that need a POSIX handle (unless the
needs a pthread_t as a parameter of course). A Win32 thread can discover
POSIX thread ID by calling pthread_self(), which will create the handle if
necessary and return the pthread_t value.