Skip to content
Browse files

See ChangeLog

  • Loading branch information...
1 parent 3d5706c commit 6103c8d4224042ea08e58ffabb0d0b53413ec0db rpj committed Sep 12, 2012
Showing with 1,530 additions and 6,412 deletions.
  1. +2 −2 CONTRIBUTORS
  2. +79 −5,242 ChangeLog
  3. +21 −21 FAQ
  4. +43 −6 GNUmakefile
  5. +92 −374 Makefile
  6. +20 −88 README
  7. +2 −2 README.CV
  8. +9 −7 README.NONPORTABLE
  9. +3 −3 autostatic.c
  10. +13 −11 common.mk
  11. +0 −1 condvar.c
  12. +1 −1 create.c
  13. +11 −3 dll.c
  14. +1 −1 global.c
  15. +33 −31 implement.h
  16. +158 −157 manual/index.html
  17. +155 −118 manual/pthread_join.html
  18. +0 −3 misc.c
  19. +0 −1 mutex.c
  20. +1 −0 nonportable.c
  21. +8 −0 private.c
  22. +23 −8 pthread.h
  23. +0 −9 pthread_attr_getschedpolicy.c
  24. +4 −4 pthread_cancel.c
  25. +2 −2 pthread_cond_wait.c
  26. +3 −3 pthread_delay_np.c
  27. +3 −3 pthread_detach.c
  28. +1 −1 pthread_exit.c
  29. +1 −5 pthread_getschedparam.c
  30. +2 −2 pthread_join.c
  31. +3 −3 pthread_mutex_consistent.c
  32. +12 −13 pthread_mutex_timedlock.c
  33. +1 −0 pthread_mutexattr_init.c
  34. +3 −3 pthread_once.c
  35. +3 −3 pthread_rwlock_timedwrlock.c
  36. +3 −3 pthread_rwlock_wrlock.c
  37. +1 −1 pthread_setcanceltype.c
  38. +184 −0 pthread_timedjoin_np.c
  39. +5 −5 pthread_win32_attach_detach_np.c
  40. +3 −3 ptw32_MCS_lock.c
  41. +2 −2 ptw32_mutex_check_need_init.c
  42. +5 −5 ptw32_relmillisecs.c
  43. +1 −1 ptw32_threadDestroy.c
  44. +5 −5 ptw32_threadStart.c
  45. +3 −3 ptw32_throw.c
  46. +0 −2 rwlock.c
  47. +2 −2 sem_timedwait.c
  48. +2 −2 sem_wait.c
  49. +1 −1 signal.c
  50. +0 −1 spin.c
  51. +6 −3 tests/Bmakefile
  52. +84 −6 tests/ChangeLog
  53. +14 −10 tests/GNUmakefile
  54. +53 −21 tests/Makefile
  55. +6 −3 tests/Wmakefile
  56. +0 −1 tests/benchtest1.c
  57. +0 −1 tests/benchtest2.c
  58. +0 −1 tests/benchtest3.c
  59. +0 −1 tests/benchtest4.c
  60. +0 −1 tests/benchtest5.c
  61. +1 −1 tests/cancel1.c
  62. +15 −35 tests/cancel2.c
  63. +5 −5 tests/cancel3.c
  64. +6 −6 tests/cancel4.c
  65. +4 −4 tests/cancel5.c
  66. +5 −5 tests/cancel6a.c
  67. +5 −5 tests/cancel6d.c
  68. +1 −1 tests/cancel7.c
  69. +1 −1 tests/cancel8.c
  70. +3 −3 tests/cancel9.c
  71. +5 −3 tests/cleanup0.c
  72. +7 −5 tests/cleanup1.c
  73. +4 −2 tests/cleanup2.c
  74. +4 −2 tests/cleanup3.c
  75. +4 −4 tests/condvar2.c
  76. +1 −1 tests/condvar6.c
  77. +2 −2 tests/condvar7.c
  78. +1 −1 tests/condvar8.c
  79. +3 −3 tests/condvar9.c
  80. +0 −2 tests/context1.c
  81. +1 −1 tests/errno1.c
  82. +3 −3 tests/exception1.c
  83. +13 −2 tests/exception2.c
  84. +6 −7 tests/exception3.c
  85. +180 −0 tests/exception3_0.c
  86. +1 −2 tests/exit1.c
  87. +1 −1 tests/exit4.c
  88. +1 −1 tests/exit5.c
  89. +2 −5 tests/eyal1.c
  90. +87 −0 tests/join4.c
  91. +0 −3 tests/mutex6.c
  92. +0 −3 tests/mutex6e.c
  93. +0 −3 tests/mutex6es.c
  94. +2 −5 tests/mutex6n.c
  95. +0 −3 tests/mutex6r.c
  96. +0 −3 tests/mutex6rs.c
  97. +0 −3 tests/mutex6s.c
  98. +0 −3 tests/mutex7.c
  99. +0 −3 tests/mutex7e.c
  100. +0 −3 tests/mutex7n.c
  101. +0 −3 tests/mutex7r.c
  102. +0 −1 tests/mutex8.c
  103. +0 −1 tests/mutex8e.c
  104. +0 −1 tests/mutex8n.c
  105. +0 −1 tests/mutex8r.c
  106. +5 −2 tests/once2.c
  107. +15 −6 tests/once3.c
  108. +7 −4 tests/once4.c
  109. +4 −4 tests/openmp1.c
  110. +26 −24 tests/semaphore3.c
  111. +6 −5 tests/test.h
View
4 CONTRIBUTORS
@@ -55,7 +55,7 @@ Rich Peters rpeters at micro-magic dot com
Todd Owen towen at lucidcalm dot dropbear dot id dot au
Bug fixes to dll loading.
Jason Nye jnye at nbnet dot nb dot ca
- Implementation of async cancelation.
+ Implementation of async cancellation.
Fred Forester fforest at eticomm dot net
Kevin D. Clark kclark at cabletron dot com
David Baggett dmb at itasoftware dot com
@@ -116,7 +116,7 @@ Makoto Kato raven at oldskool dot jp
Panagiotis E. Hadjidoukas peh at hpclab dot ceid dot upatras dot gr
phadjido at cs dot uoi dot gr
Contributed the QueueUserAPCEx package which
- makes preemptive async cancelation possible.
+ makes preemptive async cancellation possible.
Will Bryant will dot bryant at ecosm dot com
Borland compiler patch and makefile.
Anuj Goyal anuj dot goyal at gmail dot com
View
5,321 ChangeLog
79 additions, 5,242 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
42 FAQ
@@ -25,7 +25,7 @@ Q 7 Now that pthreads-win32 builds under Mingw32, why do I get
Q 8 How do I use pthread.dll for Win32 (Visual C++ 5.0)
-Q 9 Cancelation doesn't work for me, why?
+Q 9 cancellation doesn't work for me, why?
Q 10 How do I generate pthreadGCE.dll and libpthreadw32.a for use
with Mingw32?
@@ -61,15 +61,15 @@ Simply, you only use one of them, but you need to choose carefully.
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 cleanup implementation, and one that uses
+cancellation and cleanup 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
+to how POSIX threads cancellation 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,
+The issue is: should cancellation 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?
@@ -161,7 +161,7 @@ of the following was defined accordingly:
__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
+most importantly, the way that cancellation 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
@@ -173,7 +173,7 @@ is when it's canceled or exits via pthread_exit().
After snapshot 2001-07-12, unless your 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,
+uses setjmp/longjmp in the cancellation 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.
@@ -305,10 +305,10 @@ Ross
------------------------------------------------------------------------------
-Q 9 Cancelation doesn't work for me, why?
+Q 9 cancellation doesn't work for me, why?
---
-> I'm investigating a problem regarding thread cancelation. The thread I want
+> I'm investigating a problem regarding thread cancellation. The thread I want
> to cancel has PTHREAD_CANCEL_ASYNCHRONOUS, however, this piece of code
> blocks on the join():
>
@@ -332,36 +332,36 @@ Q 9 Cancelation doesn't work for me, why?
The answer to your first question is, normal POSIX behaviour would
be to asynchronously cancel the thread. However, even that doesn't
-guarantee cancelation as the standard only says it should be
+guarantee cancellation as the standard only says it should be
cancelled as soon as possible.
Snapshot 99-11-02 or earlier only partially supports asynchronous cancellation.
-Snapshots since then simulate async cancelation by poking the address of
-a cancelation routine into the PC of the threads context. This requires
-the thread to be resumed in some way for the cancelation to actually
-proceed. This is not true async cancelation, but it is as close as we've
+Snapshots since then simulate async cancellation by poking the address of
+a cancellation routine into the PC of the threads context. This requires
+the thread to be resumed in some way for the cancellation to actually
+proceed. This is not true async cancellation, but it is as close as we've
been able to get to it.
If the thread you're trying to cancel is blocked (for instance, it could be
waiting for data from the network), it will only get cancelled when it unblocks
-(when the data arrives). For true pre-emptive cancelation in these cases,
+(when the data arrives). For true pre-emptive cancellation in these cases,
pthreads-win32 from snapshot 2004-05-16 can automatically recognise and use the
QueueUserAPCEx package by Panagiotis E. Hadjidoukas. This package is available
from the pthreads-win32 ftp site and is included in the pthreads-win32
self-unpacking zip from 2004-05-16 onwards.
-Using deferred cancelation would normally be the way to go, however,
+Using deferred cancellation would normally be the way to go, however,
even though the POSIX threads standard lists a number of C library
-functions that are defined as deferred cancelation points, there is
+functions that are defined as deferred cancellation points, there is
no hookup between those which are provided by Windows and the
pthreads-win32 library.
Incidently, it's worth noting for code portability that the older POSIX
-threads standards cancelation point lists didn't include "select" because
+threads standards cancellation point lists didn't include "select" because
(as I read in Butenhof) it wasn't part of POSIX. However, it does appear in
the SUSV3.
-Effectively, the only mandatory cancelation points that pthreads-win32
+Effectively, the only mandatory cancellation points that pthreads-win32
recognises are those the library implements itself, ie.
pthread_testcancel
@@ -373,19 +373,19 @@ recognises are those the library implements itself, ie.
pthread_delay_np
The following routines from the non-mandatory list in SUSV3 are
-cancelation points in pthreads-win32:
+cancellation points in pthreads-win32:
pthread_rwlock_wrlock
pthread_rwlock_timedwrlock
The following routines from the non-mandatory list in SUSV3 are not
-cancelation points in pthreads-win32:
+cancellation points in pthreads-win32:
pthread_rwlock_rdlock
pthread_rwlock_timedrdlock
Pthreads-win32 also provides two functions that allow you to create
-cancelation points within your application, but only for cases where
+cancellation points within your application, but only for cases where
a thread is going to block on a Win32 handle. These are:
pthreadCancelableWait(HANDLE waitHandle) /* Infinite wait */
View
49 GNUmakefile
@@ -162,18 +162,18 @@ all:
TEST_ENV = PTW32_FLAGS="$(PTW32_FLAGS) -DNO_ERROR_DIALOGS" DLL_VER=$(DLL_VER)
all-tests:
-# $(MAKE) realclean GC
-# cd tests && $(MAKE) clean GC $(TEST_ENV) && $(MAKE) clean GCX $(TEST_ENV)
-# $(MAKE) realclean GCE
-# cd tests && $(MAKE) clean GCE $(TEST_ENV)
+ $(MAKE) realclean GC
+ cd tests && $(MAKE) clean GC $(TEST_ENV) && $(MAKE) clean GCX $(TEST_ENV)
+ $(MAKE) realclean GCE
+ cd tests && $(MAKE) clean GCE $(TEST_ENV)
$(MAKE) realclean GC-inlined
cd tests && $(MAKE) clean GC $(TEST_ENV) && $(MAKE) clean GCX $(TEST_ENV)
$(MAKE) realclean GCE-inlined
cd tests && $(MAKE) clean GCE $(TEST_ENV)
$(MAKE) realclean GC-static
cd tests && $(MAKE) clean GC-static $(TEST_ENV)
$(MAKE) realclean GC-small-static
- cd tests && $(MAKE) clean GC-small-static $(TEST_ENV)
+ cd tests && $(MAKE) clean GC-static $(TEST_ENV)
@ $(ECHO) "$@ completed successfully."
all-tests-cflags:
@@ -292,4 +292,41 @@ realclean: clean
-$(RM) $(GCED_INLINED_STAMP)
-$(RM) $(GCD_STATIC_STAMP)
-$(RM) $(GCD_SMALL_STATIC_STAMP)
- -cd tests && $(MAKE) clean
+ -cd tests && $(MAKE) clean
+
+var_check_list =
+
+define var_check_target
+var-check-$(1):
+ @for src in $($(1)); do \
+ fgrep -q "\"$$$$src\"" $(2) && continue; \
+ echo "$$$$src is in \$$$$($(1)), but not in $(2)"; \
+ exit 1; \
+ done
+ @grep '^# *include *".*\.c"' $(2) | cut -d'"' -f2 | while read src; do \
+ echo " $($(1)) " | fgrep -q " $$$$src " && continue; \
+ echo "$$$$src is in $(2), but not in \$$$$($(1))"; \
+ exit 1; \
+ done
+ @echo "$(1) <-> $(2): OK"
+
+var_check_list += var-check-$(1)
+endef
+
+$(eval $(call var_check_target,ATTR_SRCS,attr.c))
+$(eval $(call var_check_target,BARRIER_SRCS,barrier.c))
+$(eval $(call var_check_target,CANCEL_SRCS,cancel.c))
+$(eval $(call var_check_target,CONDVAR_SRCS,condvar.c))
+$(eval $(call var_check_target,EXIT_SRCS,exit.c))
+$(eval $(call var_check_target,MISC_SRCS,misc.c))
+$(eval $(call var_check_target,MUTEX_SRCS,mutex.c))
+$(eval $(call var_check_target,NONPORTABLE_SRCS,nonportable.c))
+$(eval $(call var_check_target,PRIVATE_SRCS,private.c))
+$(eval $(call var_check_target,RWLOCK_SRCS,rwlock.c))
+$(eval $(call var_check_target,SCHED_SRCS,sched.c))
+$(eval $(call var_check_target,SEMAPHORE_SRCS,semaphore.c))
+$(eval $(call var_check_target,SPIN_SRCS,spin.c))
+$(eval $(call var_check_target,SYNC_SRCS,sync.c))
+$(eval $(call var_check_target,TSD_SRCS,tsd.c))
+
+srcs-vars-check: $(var_check_list)
View
466 Makefile
@@ -1,6 +1,4 @@
-# This makefile is compatible with MS nmake and can be used as a
-# replacement for buildlib.bat. I've changed the target from an ordinary dll
-# (/LD) to a debugging dll (/LDd).
+# This makefile is compatible with MS nmake
#
# The variables $DLLDEST and $LIBDEST hold the destination directories for the
# dll and the lib, respectively. Probably all that needs to change is $DEVROOT.
@@ -23,6 +21,8 @@ INLINED_STAMPS = pthreadVCE$(DLL_VER).stamp pthreadVSE$(DLL_VER).stamp pthreadVC
pthreadVCE$(DLL_VERD).stamp pthreadVSE$(DLL_VERD).stamp pthreadVC$(DLL_VERD).stamp
STATIC_STAMPS = pthreadVCE$(DLL_VER).static pthreadVSE$(DLL_VER).static pthreadVC$(DLL_VER).static \
pthreadVCE$(DLL_VERD).static pthreadVSE$(DLL_VERD).static pthreadVC$(DLL_VERD).static
+SMALL_STATIC_STAMPS = pthreadVCE$(DLL_VER).small_stamp pthreadVSE$(DLL_VER).small_stamp pthreadVC$(DLL_VER).small_stamp \
+ pthreadVCE$(DLL_VERD).small_stamp pthreadVSE$(DLL_VERD).small_stamp pthreadVC$(DLL_VERD).small_stamp
CC = cl
CPPFLAGS = /I. /DHAVE_PTW32_CONFIG_H
@@ -37,372 +37,78 @@ CFLAGSD = /Z7 $(XCFLAGS)
CLEANUP = __CLEANUP_C
# C++ Exceptions
-VCEFLAGS = /EHsc /TP $(CPPFLAGS) $(CFLAGS)
-VCEFLAGSD = /EHsc /TP $(CPPFLAGS) $(CFLAGSD)
+VCEFLAGS = /EHs /TP $(CPPFLAGS) $(CFLAGS)
+VCEFLAGSD = /EHs /TP $(CPPFLAGS) $(CFLAGSD)
#Structured Exceptions
VSEFLAGS = $(CPPFLAGS) $(CFLAGS)
VSEFLAGSD = $(CPPFLAGS) $(CFLAGSD)
#C cleanup code
VCFLAGS = $(CPPFLAGS) $(CFLAGS)
VCFLAGSD = $(CPPFLAGS) $(CFLAGSD)
-DLL_INLINED_OBJS = \
- pthread.obj \
- version.res
-
-# Aggregate modules for inlinability
-DLL_OBJS = \
- attr.obj \
- barrier.obj \
- cancel.obj \
- cleanup.obj \
- condvar.obj \
- create.obj \
- dll.obj \
- autostatic.obj \
- errno.obj \
- exit.obj \
- fork.obj \
- global.obj \
- misc.obj \
- mutex.obj \
- nonportable.obj \
- private.obj \
- rwlock.obj \
- sched.obj \
- semaphore.obj \
- signal.obj \
- spin.obj \
- sync.obj \
- tsd.obj \
- version.res
-
-# Separate modules for minimising the size of statically linked images
-SMALL_STATIC_OBJS = \
- pthread_attr_init.obj \
- pthread_attr_destroy.obj \
- pthread_attr_getdetachstate.obj \
- pthread_attr_setdetachstate.obj \
- pthread_attr_getstackaddr.obj \
- pthread_attr_setstackaddr.obj \
- pthread_attr_getstacksize.obj \
- pthread_attr_setstacksize.obj \
- pthread_attr_getscope.obj \
- pthread_attr_setscope.obj \
- pthread_attr_setschedpolicy.obj \
- pthread_attr_getschedpolicy.obj \
- pthread_attr_setschedparam.obj \
- pthread_attr_getschedparam.obj \
- pthread_attr_setinheritsched.obj \
- pthread_attr_getinheritsched.obj \
- pthread_barrier_init.obj \
- pthread_barrier_destroy.obj \
- pthread_barrier_wait.obj \
- pthread_barrierattr_init.obj \
- pthread_barrierattr_destroy.obj \
- pthread_barrierattr_setpshared.obj \
- pthread_barrierattr_getpshared.obj \
- pthread_setcancelstate.obj \
- pthread_setcanceltype.obj \
- pthread_testcancel.obj \
- pthread_cancel.obj \
- cleanup.obj \
- pthread_condattr_destroy.obj \
- pthread_condattr_getpshared.obj \
- pthread_condattr_init.obj \
- pthread_condattr_setpshared.obj \
- pthread_cond_destroy.obj \
- pthread_cond_init.obj \
- pthread_cond_signal.obj \
- pthread_cond_wait.obj \
- create.obj \
- dll.obj \
- autostatic.obj \
- errno.obj \
- pthread_exit.obj \
- fork.obj \
- global.obj \
- pthread_mutex_init.obj \
- pthread_mutex_destroy.obj \
- pthread_mutexattr_init.obj \
- pthread_mutexattr_destroy.obj \
- pthread_mutexattr_getpshared.obj \
- pthread_mutexattr_setpshared.obj \
- pthread_mutexattr_settype.obj \
- pthread_mutexattr_gettype.obj \
- pthread_mutexattr_setrobust.obj \
- pthread_mutexattr_getrobust.obj \
- pthread_mutex_lock.obj \
- pthread_mutex_timedlock.obj \
- pthread_mutex_unlock.obj \
- pthread_mutex_trylock.obj \
- pthread_mutex_consistent.obj \
- pthread_mutexattr_setkind_np.obj \
- pthread_mutexattr_getkind_np.obj \
- pthread_getw32threadhandle_np.obj \
- pthread_getunique_np.obj \
- pthread_delay_np.obj \
- pthread_num_processors_np.obj \
- pthread_win32_attach_detach_np.obj \
- pthread_equal.obj \
- pthread_getconcurrency.obj \
- pthread_once.obj \
- pthread_self.obj \
- pthread_setconcurrency.obj \
- pthread_rwlock_init.obj \
- pthread_rwlock_destroy.obj \
- pthread_rwlockattr_init.obj \
- pthread_rwlockattr_destroy.obj \
- pthread_rwlockattr_getpshared.obj \
- pthread_rwlockattr_setpshared.obj \
- pthread_rwlock_rdlock.obj \
- pthread_rwlock_wrlock.obj \
- pthread_rwlock_unlock.obj \
- pthread_rwlock_tryrdlock.obj \
- pthread_rwlock_trywrlock.obj \
- pthread_setschedparam.obj \
- pthread_getschedparam.obj \
- pthread_timechange_handler_np.obj \
- ptw32_is_attr.obj \
- ptw32_processInitialize.obj \
- ptw32_processTerminate.obj \
- ptw32_threadStart.obj \
- ptw32_threadDestroy.obj \
- ptw32_tkAssocCreate.obj \
- ptw32_tkAssocDestroy.obj \
- ptw32_callUserDestroyRoutines.obj \
- ptw32_timespec.obj \
- ptw32_throw.obj \
- ptw32_getprocessors.obj \
- ptw32_calloc.obj \
- ptw32_new.obj \
- ptw32_reuse.obj \
- ptw32_rwlock_check_need_init.obj \
- ptw32_cond_check_need_init.obj \
- ptw32_mutex_check_need_init.obj \
- ptw32_semwait.obj \
- ptw32_relmillisecs.obj \
- ptw32_MCS_lock.obj \
- sched_get_priority_max.obj \
- sched_get_priority_min.obj \
- sched_setscheduler.obj \
- sched_getscheduler.obj \
- sched_yield.obj \
- sem_init.obj \
- sem_destroy.obj \
- sem_trywait.obj \
- sem_timedwait.obj \
- sem_wait.obj \
- sem_post.obj \
- sem_post_multiple.obj \
- sem_getvalue.obj \
- sem_open.obj \
- sem_close.obj \
- sem_unlink.obj \
- signal.obj \
- pthread_kill.obj \
- ptw32_spinlock_check_need_init.obj \
- pthread_spin_init.obj \
- pthread_spin_destroy.obj \
- pthread_spin_lock.obj \
- pthread_spin_unlock.obj \
- pthread_spin_trylock.obj \
- pthread_detach.obj \
- pthread_join.obj \
- pthread_key_create.obj \
- pthread_key_delete.obj \
- pthread_setspecific.obj \
- pthread_getspecific.obj \
- w32_CancelableWait.obj \
- version.res
-
-INCL = config.h implement.h semaphore.h pthread.h need_errno.h
-
-ATTR_SRCS = \
- pthread_attr_init.c \
- pthread_attr_destroy.c \
- pthread_attr_getdetachstate.c \
- pthread_attr_setdetachstate.c \
- pthread_attr_getstackaddr.c \
- pthread_attr_setstackaddr.c \
- pthread_attr_getstacksize.c \
- pthread_attr_setstacksize.c \
- pthread_attr_getscope.c \
- pthread_attr_setscope.c
-
-BARRIER_SRCS = \
- pthread_barrier_init.c \
- pthread_barrier_destroy.c \
- pthread_barrier_wait.c \
- pthread_barrierattr_init.c \
- pthread_barrierattr_destroy.c \
- pthread_barrierattr_setpshared.c \
- pthread_barrierattr_getpshared.c
-
-CANCEL_SRCS = \
- pthread_setcancelstate.c \
- pthread_setcanceltype.c \
- pthread_testcancel.c \
- pthread_cancel.c
-
-CONDVAR_SRCS = \
- ptw32_cond_check_need_init.c \
- pthread_condattr_destroy.c \
- pthread_condattr_getpshared.c \
- pthread_condattr_init.c \
- pthread_condattr_setpshared.c \
- pthread_cond_destroy.c \
- pthread_cond_init.c \
- pthread_cond_signal.c \
- pthread_cond_wait.c
-
-EXIT_SRCS = \
- pthread_exit.c
-
-MISC_SRCS = \
- pthread_equal.c \
- pthread_getconcurrency.c \
- pthread_kill.c \
- pthread_once.c \
- pthread_self.c \
- pthread_setconcurrency.c \
- ptw32_calloc.c \
- ptw32_MCS_lock.c \
- ptw32_new.c \
- ptw32_reuse.c \
- ptw32_relmillisecs.c \
- w32_CancelableWait.c
-
-MUTEX_SRCS = \
- ptw32_mutex_check_need_init.c \
- pthread_mutex_init.c \
- pthread_mutex_destroy.c \
- pthread_mutexattr_init.c \
- pthread_mutexattr_destroy.c \
- pthread_mutexattr_getpshared.c \
- pthread_mutexattr_setpshared.c \
- pthread_mutexattr_settype.c \
- pthread_mutexattr_gettype.c \
- pthread_mutexattr_setrobust.c \
- pthread_mutexattr_getrobust.c \
- pthread_mutex_lock.c \
- pthread_mutex_timedlock.c \
- pthread_mutex_unlock.c \
- pthread_mutex_trylock.c \
- pthread_mutex_consistent.c
-
-NONPORTABLE_SRCS = \
- pthread_mutexattr_setkind_np.c \
- pthread_mutexattr_getkind_np.c \
- pthread_getw32threadhandle_np.c \
- pthread_getunique_np.c \
- pthread_delay_np.c \
- pthread_num_processors_np.c \
- pthread_win32_attach_detach_np.c \
- pthread_timechange_handler_np.c
-
-PRIVATE_SRCS = \
- ptw32_is_attr.c \
- ptw32_processInitialize.c \
- ptw32_processTerminate.c \
- ptw32_threadStart.c \
- ptw32_threadDestroy.c \
- ptw32_tkAssocCreate.c \
- ptw32_tkAssocDestroy.c \
- ptw32_callUserDestroyRoutines.c \
- ptw32_semwait.c \
- ptw32_timespec.c \
- ptw32_throw.c \
- ptw32_getprocessors.c
-
-RWLOCK_SRCS = \
- ptw32_rwlock_check_need_init.c \
- ptw32_rwlock_cancelwrwait.c \
- pthread_rwlock_init.c \
- pthread_rwlock_destroy.c \
- pthread_rwlockattr_init.c \
- pthread_rwlockattr_destroy.c \
- pthread_rwlockattr_getpshared.c \
- pthread_rwlockattr_setpshared.c \
- pthread_rwlock_rdlock.c \
- pthread_rwlock_timedrdlock.c \
- pthread_rwlock_wrlock.c \
- pthread_rwlock_timedwrlock.c \
- pthread_rwlock_unlock.c \
- pthread_rwlock_tryrdlock.c \
- pthread_rwlock_trywrlock.c
-
-SCHED_SRCS = \
- pthread_attr_setschedpolicy.c \
- pthread_attr_getschedpolicy.c \
- pthread_attr_setschedparam.c \
- pthread_attr_getschedparam.c \
- pthread_attr_setinheritsched.c \
- pthread_attr_getinheritsched.c \
- pthread_setschedparam.c \
- pthread_getschedparam.c \
- sched_get_priority_max.c \
- sched_get_priority_min.c \
- sched_setscheduler.c \
- sched_getscheduler.c \
- sched_yield.c
-
-SEMAPHORE_SRCS = \
- sem_init.c \
- sem_destroy.c \
- sem_trywait.c \
- sem_timedwait.c \
- sem_wait.c \
- sem_post.c \
- sem_post_multiple.c \
- sem_getvalue.c \
- sem_open.c \
- sem_close.c \
- sem_unlink.c
-
-SPIN_SRCS = \
- ptw32_spinlock_check_need_init.c \
- pthread_spin_init.c \
- pthread_spin_destroy.c \
- pthread_spin_lock.c \
- pthread_spin_unlock.c \
- pthread_spin_trylock.c
-
-SYNC_SRCS = \
- pthread_detach.c \
- pthread_join.c
-
-TSD_SRCS = \
- pthread_key_create.c \
- pthread_key_delete.c \
- pthread_setspecific.c \
- pthread_getspecific.c
+OBJEXT = obj
+RESEXT = res
+
+include common.mk
+DLL_INLINED_OBJS = $(DLL_INLINED_OBJS) $(RESOURCE_OBJS)
+DLL_OBJS = $(DLL_OBJS) $(RESOURCE_OBJS)
+SMALL_STATIC_OBJS = $(SMALL_STATIC_OBJS) $(RESOURCE_OBJS)
help:
@ echo Run one of the following command lines:
- @ echo nmake clean VCE (to build the MSVC dll with C++ exception handling)
- @ echo nmake clean VSE (to build the MSVC dll with structured exception handling)
- @ echo nmake clean VC (to build the MSVC dll with C cleanup code)
- @ echo nmake clean VCE-inlined (to build the MSVC inlined dll with C++ exception handling)
- @ echo nmake clean VSE-inlined (to build the MSVC inlined dll with structured exception handling)
- @ echo nmake clean VC-inlined (to build the MSVC inlined dll with C cleanup code)
- @ echo nmake clean VC-static (to build the MSVC static lib with C cleanup code)
- @ echo nmake clean VCE-debug (to build the debug MSVC dll with C++ exception handling)
- @ echo nmake clean VSE-debug (to build the debug MSVC dll with structured exception handling)
- @ echo nmake clean VC-debug (to build the debug MSVC dll with C cleanup code)
- @ echo nmake clean VCE-inlined-debug (to build the debug MSVC inlined dll with C++ exception handling)
- @ echo nmake clean VSE-inlined-debug (to build the debug MSVC inlined dll with structured exception handling)
- @ echo nmake clean VC-inlined-debug (to build the debug MSVC inlined dll with C cleanup code)
- @ echo nmake clean VC-static-debug (to build the debug MSVC static lib with C cleanup code)
+ @ echo nmake clean VC
+ @ echo nmake clean VC-inlined
+ @ echo nmake clean VC-static
+ @ echo nmake clean VC-small-static
+ @ echo nmake clean VC-debug
+ @ echo nmake clean VC-inlined-debug
+ @ echo nmake clean VC-static-debug
+ @ echo nmake clean VC-small-static-debug
+ @ echo nmake clean VCE
+ @ echo nmake clean VCE-inlined
+ @ echo nmake clean VCE-debug
+ @ echo nmake clean VCE-inlined-debug
+ @ echo nmake clean VCE-static-debug
+ @ echo nmake clean VCE-small-static-debug
+ @ echo nmake clean VSE
+ @ echo nmake clean VSE-inlined
+ @ echo nmake clean VSE-debug
+ @ echo nmake clean VSE-inlined-debug
all:
- @ $(MAKE) /E clean VCE-inlined
- @ $(MAKE) /E clean VSE-inlined
- @ $(MAKE) /E clean VC-inlined
- @ $(MAKE) /E clean VCE-inlined-debug
- @ $(MAKE) /E clean VSE-inlined-debug
- @ $(MAKE) /E clean VC-inlined-debug
+ $(MAKE) /E clean VCE-inlined
+ $(MAKE) /E clean VSE-inlined
+ $(MAKE) /E clean VC-inlined
+ $(MAKE) /E clean VCE-inlined-debug
+ $(MAKE) /E clean VSE-inlined-debug
+ $(MAKE) /E clean VC-inlined-debug
+
+TEST_ENV = CFLAGS="$(CFLAGS) /DNO_ERROR_DIALOGS"
+
+all-tests:
+ $(MAKE) /E realclean VC
+ cd tests && $(MAKE) /E clean VC $(TEST_ENV) && $(MAKE) /E clean VCX $(TEST_ENV)
+ $(MAKE) /E realclean VCE
+ cd tests && $(MAKE) /E clean VCE $(TEST_ENV)
+ $(MAKE) /E realclean VSE
+ cd tests && $(MAKE) /E clean VSE $(TEST_ENV)
+ $(MAKE) /E realclean VC-inlined
+ cd tests && $(MAKE) /E clean VC $(TEST_ENV) && $(MAKE) /E clean VCX $(TEST_ENV)
+ $(MAKE) /E realclean VCE-inlined
+ cd tests && $(MAKE) /E clean VCE $(TEST_ENV)
+ $(MAKE) /E realclean VSE-inlined
+ cd tests && $(MAKE) /E clean VSE $(TEST_ENV)
+ $(MAKE) /E realclean VC-static
+ cd tests && $(MAKE) /E clean VC-static $(TEST_ENV)
+ $(MAKE) /E realclean VC-small-static
+ cd tests && $(MAKE) /E clean VC-static $(TEST_ENV)
+ @ echo $@ completed successfully.
+
+all-tests-cflags:
+ $(MAKE) all-tests XCFLAGS="/W3 /WX /MD /nologo"
+ $(MAKE) all-tests XCFLAGS="/W3 /WX /MT /nologo"
+ @ echo $@ completed successfully.
VCE:
@ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS)" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).dll
@@ -444,17 +150,42 @@ VC-inlined:
VC-inlined-debug:
@ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_BUILD_INLINED" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).stamp
+#
+# Static builds
+#
+
VC-static:
@ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).static
VC-static-debug:
@ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).static
+VC-small-static:
+ @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGS) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VER).small_stamp
+
+VC-small-static-debug:
+ @ $(MAKE) /E /nologo EHFLAGS="$(VCFLAGSD) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_C pthreadVC$(DLL_VERD).small_stamp
+
+VCE-static:
+ @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).static
+
+VCE-small-static:
+ @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGS) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VER).small_stamp
+
+VCE-static-debug:
+ @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /DPTW32_BUILD_INLINED /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).static
+
+VCE-small-static-debug:
+ @ $(MAKE) /E /nologo EHFLAGS="$(VCEFLAGSD) /DPTW32_STATIC_LIB" CLEANUP=__CLEANUP_CXX pthreadVCE$(DLL_VERD).small_stamp
+
+
realclean: clean
if exist pthread*.dll del pthread*.dll
if exist pthread*.lib del pthread*.lib
if exist *.manifest del *.manifest
if exist *.stamp del *.stamp
+ if exist *.small_stamp del *.small_stamp
+ cd tests && $(MAKE) clean
clean:
if exist *.obj del *.obj
@@ -469,7 +200,7 @@ clean:
install:
- copy pthread*.dll $(DLLDEST)
+ if exist pthread*.dll copy pthread*.dll $(DLLDEST)
copy pthread*.lib $(LIBDEST)
copy pthread.h $(HDRDEST)
copy sched.h $(HDRDEST)
@@ -485,6 +216,10 @@ $(STATIC_STAMPS): $(DLL_INLINED_OBJS)
if exist $*.lib del $*.lib
lib $(DLL_INLINED_OBJS) /out:$*.lib
+$(SMALL_STATIC_STAMPS): $(SMALL_STATIC_OBJS)
+ if exist $*.lib del $*.lib
+ lib $(SMALL_STATIC_OBJS) /out:$*.lib
+
.c.obj:
$(CC) $(EHFLAGS) /D$(CLEANUP) -c $<
@@ -495,20 +230,3 @@ $(STATIC_STAMPS): $(DLL_INLINED_OBJS)
.c.i:
$(CC) /P /O2 /Ob1 $(VCFLAGS) $<
-
-attr.obj: attr.c $(ATTR_SRCS) $(INCL)
-barrier.obj: barrier.c $(BARRIER_SRCS) $(INCL)
-cancel.obj: cancel.c $(CANCEL_SRCS) $(INCL)
-condvar.obj: condvar.c $(CONDVAR_SRCS) $(INCL)
-exit.obj: exit.c $(EXIT_SRCS) $(INCL)
-misc.obj: misc.c $(MISC_SRCS) $(INCL)
-mutex.obj: mutex.c $(MUTEX_SRCS) $(INCL)
-nonportable.obj: nonportable.c $(NONPORTABLE_SRCS) $(INCL)
-private.obj: private.c $(PRIVATE_SRCS) $(INCL)
-rwlock.obj: rwlock.c $(RWLOCK_SRCS) $(INCL)
-sched.obj: sched.c $(SCHED_SRCS) $(INCL)
-semaphore.obj: semaphore.c $(SEMAPHORE_SRCS) $(INCL)
-spin.obj: spin.c $(SPIN_SRCS) $(INCL)
-sync.obj: sync.c $(SYNC_SRCS) $(INCL)
-tsd.obj: tsd.c $(TSD_SRCS) $(INCL)
-version.res: version.rc $(INCL)
View
108 README
@@ -31,11 +31,11 @@ MSVC or GNU C (MinGW32 MSys development kit)
To build from source.
QueueUserAPCEx by Panagiotis E. Hadjidoukas
- To support any thread cancelation in C++ library builds or
- to support cancelation of blocked threads in any build.
+ To support any thread cancellation in C++ library builds or
+ to support cancellation of blocked threads in any build.
This library is not required otherwise.
- For true async cancelation of threads (including blocked threads).
+ For true async cancellation of threads (including blocked threads).
This is a DLL and Windows driver that provides pre-emptive APC
by forcing threads into an alertable state when the APC is queued.
Both the DLL and driver are provided with the pthreads-win32.exe
@@ -47,7 +47,7 @@ QueueUserAPCEx by Panagiotis E. Hadjidoukas
Pthreads-win32 will automatically detect if the QueueUserAPCEx DLL
QuserEx.DLL is available and whether the driver AlertDrv.sys is
loaded. If it is not available, pthreads-win32 will simulate async
- cancelation, which means that it can async cancel only threads that
+ cancellation, which means that it can async cancel only threads that
are runnable. The simulated async cancellation cannot cancel blocked
threads.
@@ -194,15 +194,15 @@ 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. The default version uses
+cancellation and exit implementation. The default version uses
setjmp/longjmp.
-There is some contension amongst POSIX threads experts as
-to how POSIX threads cancelation and exit should work
+There is some contention amongst POSIX threads experts as
+to how POSIX threads cancellation and exit should work
with languages that use exceptions, e.g. C++ and even C
(Microsoft's Structured Exceptions).
-The issue is: should cancelation of a thread in, say,
+The issue is: should cancellation 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?
@@ -248,9 +248,9 @@ threads then you will need to replace the "catch(...)" with the macro
}
#endif
-Otherwise neither pthreads cancelation nor pthread_exit() will work
+Otherwise neither pthreads cancellation nor pthread_exit() will work
reliably when using versions of the library that use C++ exceptions
-for cancelation and thread exit.
+for cancellation 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
@@ -285,7 +285,7 @@ from the compiler used, and one of the following was defined accordingly:
__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
+most importantly, the way that cancellation and thread exit (via
pthread_exit) is performed (see the routine ptw32_throw()).
In short, the exceptions versions of the library throw an exception
@@ -297,7 +297,7 @@ 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,
+uses setjmp/longjmp in the cancellation 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.
@@ -337,26 +337,6 @@ help information. E.g.
$ nmake
-Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
-Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
-
-Run one of the following command lines:
-nmake clean VCE (to build the MSVC dll with C++ exception handling)
-nmake clean VSE (to build the MSVC dll with structured exception handling)
-nmake clean VC (to build the MSVC dll with C cleanup code)
-nmake clean VCE-inlined (to build the MSVC inlined dll with C++ exception handling)
-nmake clean VSE-inlined (to build the MSVC inlined dll with structured exception handling)
-nmake clean VC-inlined (to build the MSVC inlined dll with C cleanup code)
-nmake clean VC-static (to build the MSVC static lib with C cleanup code)
-nmake clean VCE-debug (to build the debug MSVC dll with C++ exception handling)
-nmake clean VSE-debug (to build the debug MSVC dll with structured exception handling)
-nmake clean VC-debug (to build the debug MSVC dll with C cleanup code)
-nmake clean VCE-inlined-debug (to build the debug MSVC inlined dll with C++ exception handling)
-nmake clean VSE-inlined-debug (to build the debug MSVC inlined dll with structured exception handling)
-nmake clean VC-inlined-debug (to build the debug MSVC inlined dll with C cleanup code)
-nmake clean VC-static-debug (to build the debug MSVC static lib with C cleanup code)
-
-
The pre-built dlls are normally built using the *-inlined targets.
You can run the testsuite by changing to the "tests" directory and
@@ -365,58 +345,19 @@ running nmake. E.g.:
$ cd tests
$ nmake
-Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
-Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
-
-Run one of the following command lines:
-nmake clean VC (to test using VC dll with VC (no EH) applications)
-nmake clean VCX (to test using VC dll with VC++ (EH) applications)
-nmake clean VCE (to test using the VCE dll with VC++ EH applications)
-nmake clean VSE (to test using VSE dll with VC (SEH) applications)
-nmake clean VC-bench (to benchtest using VC dll with C bench app)
-nmake clean VCX-bench (to benchtest using VC dll with C++ bench app)
-nmake clean VCE-bench (to benchtest using VCE dll with C++ bench app)
-nmake clean VSE-bench (to benchtest using VSE dll with SEH bench app)
-nmake clean VC-static (to test using VC static lib with VC (no EH) applications)
-
-
Building under Mingw32
----------------------
The dll can be built easily with recent versions of Mingw32.
(The distributed versions are built using Mingw32 and MsysDTK
from www.mingw32.org.)
-From the source directory, run make for help information. E.g.:
-
-$ make
-Run one of the following command lines:
-make clean GC (to build the GNU C dll with C cleanup code)
-make clean GCE (to build the GNU C dll with C++ exception handling)
-make clean GC-inlined (to build the GNU C inlined dll with C cleanup code)
-make clean GCE-inlined (to build the GNU C inlined dll with C++ exception handling)
-make clean GC-static (to build the GNU C inlined static lib with C cleanup code)
-make clean GC-debug (to build the GNU C debug dll with C cleanup code)
-make clean GCE-debug (to build the GNU C debug dll with C++ exception handling)
-make clean GC-inlined-debug (to build the GNU C inlined debug dll with C cleanup code)
-make clean GCE-inlined-debug (to build the GNU C inlined debug dll with C++ exception handling)
-make clean GC-static-debug (to build the GNU C inlined static debug lib with C cleanup code)
-
+From the source directory, run 'make' without arguments for help information.
The pre-built dlls are normally built using the *-inlined targets.
You can run the testsuite by changing to the "tests" directory and
-running make for help information. E.g.:
-
-$ cd tests
-$ make
-Run one of the following command lines:
-make clean GC (to test using GC dll with C (no EH) applications)
-make clean GCX (to test using GC dll with C++ (EH) applications)
-make clean GCE (to test using GCE dll with C++ (EH) applications)
-make clean GC-bench (to benchtest using GNU C dll with C cleanup code)
-make clean GCE-bench (to benchtest using GNU C dll with C++ exception handling)
-make clean GC-static (to test using GC static lib with C (no EH) applications)
+running 'make' for help information.
Building under Linux using the Mingw32 cross development tools
@@ -450,29 +391,20 @@ MinGW32 (creates libpthreadGCn.a as a static link lib):
make clean GC-static
-Define PTW32_STATIC_LIB when building your application. Also, your
-application must call a two non-portable routines to initialise the
-some state on startup and cleanup before exit. One other routine needs
-to be called to cleanup after any Win32 threads have called POSIX API
+Define PTW32_STATIC_LIB when building your application.
+
+The application must call pthread_win32_process_detach_np() at thread
+exit to cleanup after any Win32 threads have called POSIX API
routines. See README.NONPORTABLE or the html reference manual pages for
-details on these routines:
+details:
-BOOL pthread_win32_process_attach_np (void);
-BOOL pthread_win32_process_detach_np (void);
-BOOL pthread_win32_thread_attach_np (void); // Currently a no-op
BOOL pthread_win32_thread_detach_np (void);
-The tests makefiles have the same targets but only check that the
-static library is statically linkable. They don't run the full
-testsuite. To run the full testsuite, build the dlls and run the
-dll test targets.
-
-
Building the library under Cygwin
---------------------------------
-Cygwin is implementing it's own POSIX threads routines and these
+Cygwin implements it's own POSIX threads routines and these
will be the ones to use if you develop using Cygwin.
View
4 README.CV
@@ -686,9 +686,9 @@ Sleep( 1 ); // @AT
* a timeout
*
* Note:
- * ptw32_sem_timedwait is a cancelation point,
+ * ptw32_sem_timedwait is a cancellation point,
* hence providing the
- * mechanism for making pthread_cond_wait a cancelation
+ * mechanism for making pthread_cond_wait a cancellation
* point. We use the cleanup mechanism to ensure we
* re-lock the mutex and decrement the waiters count
* if we are canceled.
View
16 README.NONPORTABLE
@@ -25,7 +25,7 @@ pthread_win32_test_features_np(int mask)
QUSEREX.DLL is available and the AlertDrv.sys
driver is loaded into Windows, providing
alertable (pre-emptive) asyncronous threads
- cancelation. If this feature returns FALSE
+ cancellation. If this feature returns FALSE
then the default async cancel scheme is in
use, which cannot cancel blocked threads.
@@ -121,9 +121,9 @@ pthread_delay_np (const struct timespec *interval);
Specifying an interval of zero (0) seconds and zero (0) nanoseconds is
allowed and can be used to force the thread to give up the processor or to
- deliver a pending cancelation request.
+ deliver a pending cancellation request.
- This routine is a cancelation point.
+ This routine is a cancellation point.
The timespec structure contains the following two fields:
@@ -402,7 +402,7 @@ pthread_hash()
A single more general purpose function could also be defined as a
basis for at least the last two of the above functions.
-First we need to list the freedoms and constraints with restpect
+First we need to list the freedoms and constraints with respect
to pthread_t so that we can be sure our solution is compatible with the
standard.
@@ -772,12 +772,14 @@ I have not provided any solution to the problem of handling extra values embedde
in pthread_t, e.g. debugging or trap information that an implementation is entitled
to include. Therefore none of this replaces the portability and flexibility of API
functions but what functions are needed? The threads standard is unlikely to
-include that can be implemented by a combination of existing features and more
-generic functions (several references in the threads rationale suggest this.
+include new functions that can be implemented by a combination of existing features
+and more generic functions (several references in the threads rationale suggest this).
Therefore I propose that the following function could replace the several functions
that have been suggested in conversations:
pthread_t * pthread_normalize(pthread_t * handle);
For most existing pthreads implementations this function, or macro, would reduce to
-a no-op with zero call overhead.
+a no-op with zero call overhead. Most of the other desired operations on pthread_t
+values (null, compare, hash, etc.) can be trivially derived from this and other
+standard functions.
View
6 autostatic.c
@@ -39,7 +39,7 @@
#if defined(PTW32_STATIC_LIB)
-#if defined(__MINGW64__) || defined(__MINGW32__) || defined(_MSC_VER)
+#if defined(PTW32_CONFIG_MINGW) || defined(_MSC_VER)
/* For an explanation of this code (at least the MSVC parts), refer to
*
@@ -70,7 +70,7 @@ static int on_process_exit(void)
return 0;
}
-#if defined(__MINGW64__) || defined(__MINGW32__)
+#if defined(PTW32_CONFIG_MINGW)
__attribute__((section(".ctors"), used)) static int (*gcc_ctor)(void) = on_process_init;
__attribute__((section(".dtors"), used)) static int (*gcc_dtor)(void) = on_process_exit;
#elif defined(_MSC_VER)
@@ -88,7 +88,7 @@ static int (*msc_dtor)(void) = on_process_exit;
# endif
#endif
-#endif /* defined(__MINGW64__) || defined(__MINGW32__) || defined(_MSC_VER) */
+#endif /* defined(PTW32_CONFIG_MINGW) || defined(_MSC_VER) */
/* This dummy function exists solely to be referenced by other modules
* (specifically, in implement.h), so that the linker can't optimize away
View
24 common.mk
@@ -83,6 +83,7 @@ SMALL_STATIC_OBJS = \
pthread_getunique_np.$(OBJEXT) \
pthread_getw32threadhandle_np.$(OBJEXT) \
pthread_join.$(OBJEXT) \
+ pthread_timedjoin_np.$(OBJEXT) \
pthread_key_create.$(OBJEXT) \
pthread_key_delete.$(OBJEXT) \
pthread_kill.$(OBJEXT) \
@@ -209,7 +210,6 @@ CANCEL_SRCS = \
pthread_cancel.c
CONDVAR_SRCS = \
- ptw32_cond_check_need_init.c \
pthread_condattr_destroy.c \
pthread_condattr_getpshared.c \
pthread_condattr_init.c \
@@ -229,15 +229,9 @@ MISC_SRCS = \
pthread_once.c \
pthread_self.c \
pthread_setconcurrency.c \
- ptw32_calloc.c \
- ptw32_MCS_lock.c \
- ptw32_new.c \
- ptw32_reuse.c \
- ptw32_relmillisecs.c \
w32_CancelableWait.c
MUTEX_SRCS = \
- ptw32_mutex_check_need_init.c \
pthread_mutex_init.c \
pthread_mutex_destroy.c \
pthread_mutexattr_init.c \
@@ -259,12 +253,14 @@ NONPORTABLE_SRCS = \
pthread_mutexattr_getkind_np.c \
pthread_getw32threadhandle_np.c \
pthread_getunique_np.c \
+ pthread_timedjoin_np.c \
pthread_delay_np.c \
pthread_num_processors_np.c \
pthread_win32_attach_detach_np.c \
pthread_timechange_handler_np.c
PRIVATE_SRCS = \
+ ptw32_MCS_lock.c \
ptw32_is_attr.c \
ptw32_processInitialize.c \
ptw32_processTerminate.c \
@@ -276,11 +272,18 @@ PRIVATE_SRCS = \
ptw32_semwait.c \
ptw32_timespec.c \
ptw32_throw.c \
- ptw32_getprocessors.c
-
-RWLOCK_SRCS = \
+ ptw32_getprocessors.c \
+ ptw32_calloc.c \
+ ptw32_new.c \
+ ptw32_reuse.c \
+ ptw32_relmillisecs.c \
+ ptw32_cond_check_need_init.c \
+ ptw32_mutex_check_need_init.c \
ptw32_rwlock_check_need_init.c \
ptw32_rwlock_cancelwrwait.c \
+ ptw32_spinlock_check_need_init.c
+
+RWLOCK_SRCS = \
pthread_rwlock_init.c \
pthread_rwlock_destroy.c \
pthread_rwlockattr_init.c \
@@ -324,7 +327,6 @@ SEMAPHORE_SRCS = \
sem_unlink.c
SPIN_SRCS = \
- ptw32_spinlock_check_need_init.c \
pthread_spin_init.c \
pthread_spin_destroy.c \
pthread_spin_lock.c \
View
1 condvar.c
@@ -39,7 +39,6 @@
#include "pthread.h"
#include "implement.h"
-#include "ptw32_cond_check_need_init.c"
#include "pthread_condattr_init.c"
#include "pthread_condattr_destroy.c"
#include "pthread_condattr_getpshared.c"
View
2 create.c
@@ -200,7 +200,7 @@ pthread_create (pthread_t * tid,
* finished with it here.
*/
-#if ! (defined (__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__)
+#if ! defined (PTW32_CONFIG_MINGW) || defined (__MSVCRT__) || defined (__DMC__)
tp->threadH =
threadH =
View
14 dll.c
@@ -34,11 +34,11 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
-#if !defined(PTW32_STATIC_LIB)
-
#include "pthread.h"
#include "implement.h"
+#if !defined(PTW32_STATIC_LIB)
+
#if defined(_MSC_VER)
/*
* lpvReserved yields an unreferenced formal parameter;
@@ -89,4 +89,12 @@ DllMain (HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpvReserved)
} /* DllMain */
-#endif /* PTW32_STATIC_LIB */
+#endif /* !PTW32_STATIC_LIB */
+
+#if ! defined(PTW32_BUILD_INLINED)
+/*
+ * Avoid "translation unit is empty" warnings
+ */
+typedef int foo;
+#endif
+
View
2 global.c
@@ -62,7 +62,7 @@ unsigned __int64 ptw32_threadSeqNumber = 0;
* it will be set at runtime to a substitute routine which cannot unblock
* blocked threads.
*/
-DWORD (*ptw32_register_cancelation) (PAPCFUNC, HANDLE, DWORD) = NULL;
+DWORD (*ptw32_register_cancellation) (PAPCFUNC, HANDLE, DWORD) = NULL;
/*
* Global lock for managing pthread_t struct reuse.
View
64 implement.h
@@ -39,7 +39,7 @@
#define _IMPLEMENT_H
#if !defined(_WIN32_WINNT)
-#define _WIN32_WINNT 0x0400
+# define _WIN32_WINNT 0x0400
#endif
#include <windows.h>
@@ -60,54 +60,56 @@ typedef VOID (APIENTRY *PAPCFUNC)(DWORD dwParam);
* In case ETIMEDOUT hasn't been defined above somehow.
*/
#if !defined(ETIMEDOUT)
-# define ETIMEDOUT 10060 /* This is the value in winsock.h. */
+# define ETIMEDOUT 10060 /* This is the value in winsock.h. */
#endif
#if !defined(malloc)
-#include <malloc.h>
+# include <malloc.h>
#endif
#if defined(__CLEANUP_C)
# include <setjmp.h>
#endif
#if !defined(INT_MAX)
-#include <limits.h>
+# include <limits.h>
#endif
/* use local include files during development */
#include "semaphore.h"
#include "sched.h"
-#if defined(HAVE_C_INLINE) || defined(__cplusplus)
-#define INLINE inline
+#if ( defined(HAVE_C_INLINE) || defined(__cplusplus) ) && defined(PTW32_BUILD_INLINED)
+# define INLINE inline
#else
-#define INLINE
+# define INLINE
#endif
-#if defined(_MSC_VER) && _MSC_VER < 1300
-/*
- * MSVC 6 does not use the "volatile" qualifier
- */
-#define PTW32_INTERLOCKED_VOLATILE
+#if defined(PTW32_CONFIG_MSVC6)
+# define PTW32_INTERLOCKED_VOLATILE
#else
-#define PTW32_INTERLOCKED_VOLATILE volatile
+# define PTW32_INTERLOCKED_VOLATILE volatile
#endif
#define PTW32_INTERLOCKED_LONG long
-#define PTW32_INTERLOCKED_SIZE size_t
#define PTW32_INTERLOCKED_PVOID PVOID
#define PTW32_INTERLOCKED_LONGPTR PTW32_INTERLOCKED_VOLATILE long*
-#define PTW32_INTERLOCKED_SIZEPTR PTW32_INTERLOCKED_VOLATILE size_t*
#define PTW32_INTERLOCKED_PVOID_PTR PTW32_INTERLOCKED_VOLATILE PVOID*
+#if defined(_WIN64)
+# define PTW32_INTERLOCKED_SIZE LONGLONG
+# define PTW32_INTERLOCKED_SIZEPTR PTW32_INTERLOCKED_VOLATILE LONGLONG*
+#else
+# define PTW32_INTERLOCKED_SIZE long
+# define PTW32_INTERLOCKED_SIZEPTR PTW32_INTERLOCKED_VOLATILE long*
+#endif
-#if defined(__MINGW64__) || defined(__MINGW32__)
+#if defined(PTW32_CONFIG_MINGW)
# include <stdint.h>
#elif defined(__BORLANDC__)
# define int64_t ULONGLONG
#else
# define int64_t _int64
-# if defined(_MSC_VER) && _MSC_VER < 1300
+# if defined(PTW32_CONFIG_MSVC6)
typedef long intptr_t;
# endif
#endif
@@ -117,9 +119,9 @@ typedef VOID (APIENTRY *PAPCFUNC)(DWORD dwParam);
*/
#if defined(PTW32_STATIC_LIB)
void ptw32_autostatic_anchor(void);
-# if defined(__MINGW64__) || defined(__MINGW32__)
+# if defined(PTW32_CONFIG_MINGW)
__attribute__((unused, used))
-# endif
+# endif
static void (*local_autostatic_anchor)(void) = ptw32_autostatic_anchor;
#endif
@@ -134,7 +136,7 @@ typedef enum
PThreadStateRunning, /* Thread alive & kicking */
PThreadStateSuspended, /* Thread alive but suspended */
PThreadStateCancelPending, /* Thread alive but */
- /* has cancelation pending. */
+ /* has cancellation pending. */
PThreadStateCanceling, /* Thread alive but is */
/* in the process of terminating */
/* due to a cancellation request */
@@ -569,7 +571,7 @@ struct ThreadKeyAssoc
/* Declared in pthread_cancel.c */
-extern DWORD (*ptw32_register_cancelation) (PAPCFUNC, HANDLE, DWORD);
+extern DWORD (*ptw32_register_cancellation) (PAPCFUNC, HANDLE, DWORD);
/* Thread Reuse stack bottom marker. Must not be NULL or any valid pointer to memory. */
#define PTW32_THREAD_REUSE_EMPTY ((ptw32_thread_t *)(size_t) 1)
@@ -626,7 +628,7 @@ extern "C"
void ptw32_robust_mutex_remove(pthread_mutex_t* mutex, ptw32_thread_t* otp);
DWORD
- ptw32_RegisterCancelation (PAPCFUNC callback,
+ ptw32_Registercancellation (PAPCFUNC callback,
HANDLE threadH, DWORD callback_arg);
int ptw32_processInitialize (void);
@@ -649,7 +651,7 @@ extern "C"
void ptw32_rwlock_cancelwrwait (void *arg);
-#if ! (defined (__MINGW64__) || defined(__MINGW32__)) || (defined(__MSVCRT__) && ! defined(__DMC__))
+#if ! defined (PTW32_CONFIG_MINGW) || (defined (__MSVCRT__) && ! defined (__DMC__))
unsigned __stdcall
#else
void
@@ -767,7 +769,7 @@ extern "C"
#if defined(__GNUC__)
# if defined(_WIN64)
-# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(location, value, comparand) \
+# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_64(location, value, comparand) \
({ \
__typeof (value) _result; \
__asm__ __volatile__ \
@@ -804,7 +806,7 @@ extern "C"
})
# define PTW32_INTERLOCKED_INCREMENT_64(location) \
({ \
- PTW32_INTERLOCKED_LONG _temp = 1; \
+ PTW32_INTERLOCKED_LONG _temp = 1; \
__asm__ __volatile__ \
( \
"lock\n\t" \
@@ -816,7 +818,7 @@ extern "C"
})
# define PTW32_INTERLOCKED_DECREMENT_64(location) \
({ \
- PTW32_INTERLOCKED_LONG _temp = -1; \
+ PTW32_INTERLOCKED_LONG _temp = -1; \
__asm__ __volatile__ \
( \
"lock\n\t" \
@@ -827,7 +829,7 @@ extern "C"
--_temp; \
})
#endif
-# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG(location, value, comparand) \
+# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG(location, value, comparand) \
({ \
__typeof (value) _result; \
__asm__ __volatile__ \
@@ -864,7 +866,7 @@ extern "C"
})
# define PTW32_INTERLOCKED_INCREMENT_LONG(location) \
({ \
- PTW32_INTERLOCKED_LONG _temp = 1; \
+ PTW32_INTERLOCKED_LONG _temp = 1; \
__asm__ __volatile__ \
( \
"lock\n\t" \
@@ -876,7 +878,7 @@ extern "C"
})
# define PTW32_INTERLOCKED_DECREMENT_LONG(location) \
({ \
- PTW32_INTERLOCKED_LONG _temp = -1; \
+ PTW32_INTERLOCKED_LONG _temp = -1; \
__asm__ __volatile__ \
( \
"lock\n\t" \
@@ -901,7 +903,7 @@ extern "C"
# define PTW32_INTERLOCKED_INCREMENT_64(p) InterlockedIncrement64(PTW32_TO_VLONG64PTR(p))
# define PTW32_INTERLOCKED_DECREMENT_64(p) InterlockedDecrement64(PTW32_TO_VLONG64PTR(p))
# endif
-# if defined(_MSC_VER) && _MSC_VER < 1300 && !defined(_WIN64) /* MSVC 6 */
+# if defined(PTW32_CONFIG_MSVC6) && !defined(_WIN64)
# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_LONG(location, value, comparand) \
((LONG)InterlockedCompareExchange((PVOID *)(location), (PVOID)(value), (PVOID)(comparand)))
# else
@@ -911,7 +913,7 @@ extern "C"
# define PTW32_INTERLOCKED_EXCHANGE_ADD_LONG(p,v) InterlockedExchangeAdd((p),(v))
# define PTW32_INTERLOCKED_INCREMENT_LONG(p) InterlockedIncrement((p))
# define PTW32_INTERLOCKED_DECREMENT_LONG(p) InterlockedDecrement((p))
-# if defined(_MSC_VER) && _MSC_VER < 1300 && !defined(_WIN64) /* MSVC 6 */
+# if defined(PTW32_CONFIG_MSVC6) && !defined(_WIN64)
# define PTW32_INTERLOCKED_COMPARE_EXCHANGE_PTR InterlockedCompareExchange
# define PTW32_INTERLOCKED_EXCHANGE_PTR(location, value) \
((PVOID)InterlockedExchange((LPLONG)(location), (LONG)(value)))
View
315 manual/index.html
@@ -1,158 +1,159 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
- <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
- <TITLE></TITLE>
- <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Linux)">
- <META NAME="CREATED" CONTENT="20050504;17350500">
- <META NAME="CHANGEDBY" CONTENT="Ross Johnson">
- <META NAME="CHANGED" CONTENT="20110326;18352700">
- <META NAME="CHANGEDBY" CONTENT="Ross Johnson">
- <STYLE TYPE="text/css">
- <!--
- H4.cjk { font-family: "AR PL UMing CN" }
- H4.ctl { font-family: "Lohit Devanagari" }
- H3.cjk { font-family: "AR PL UMing CN" }
- H3.ctl { font-family: "Lohit Devanagari" }
- H2.cjk { font-family: "AR PL UMing CN" }
- H2.ctl { font-family: "Lohit Devanagari" }
- -->
- </STYLE>
-</HEAD>
-<BODY LANG="en-GB" DIR="LTR">
-<H4 CLASS="western">POSIX Threads for Windows – REFERENCE -
-<A HREF="http://sources.redhat.com/pthreads-win32">Pthreads-w32</A></H4>
-<H3 CLASS="western">Table of Contents</H3>
-<P STYLE="margin-left: 0.79in"><A HREF="#sect1" NAME="toc1">POSIX
-threads API reference</A><BR><A HREF="#sect2" NAME="toc2">Miscellaneous
-POSIX thread safe routines provided by Pthreads-w32</A><BR><A HREF="#sect3" NAME="toc3">Non-portable
-Pthreads-w32 routines</A><BR><A HREF="#sect4" NAME="toc4">Other</A></P>
-<H2 CLASS="western"><A HREF="#toc1" NAME="sect1">POSIX threads API
-reference</A></H2>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_init.html"><B>pthread_attr_destroy</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_init.html"><B>pthread_attr_getdetachstate</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_init.html"><B>pthread_attr_getinheritsched</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_init.html"><B>pthread_attr_getschedparam</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_init.html"><B>pthread_attr_getschedpolicy</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_init.html"><B>pthread_attr_getscope</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_setstackaddr.html"><B>pthread_attr_getstackaddr</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_setstacksize.html"><B>pthread_attr_getstacksize</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_init.html"><B>pthread_attr_init</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_init.html"><B>pthread_attr_setdetachstate</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_init.html"><B>pthread_attr_setinheritsched</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_init.html"><B>pthread_attr_setschedparam</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_init.html"><B>pthread_attr_setschedpolicy</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_init.html"><B>pthread_attr_setscope</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_setstackaddr.html"><B>pthread_attr_setstackaddr</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_attr_setstacksize.html"><B>pthread_attr_setstacksize</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_barrierattr_init.html"><B>pthread_barrierattr_destroy</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_barrierattr_setpshared.html"><B>pthread_barrierattr_getpshared</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_barrierattr_init.html"><B>pthread_barrierattr_init</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_barrierattr_setpshared.html"><B>pthread_barrierattr_setpshared</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_barrier_init.html"><B>pthread_barrier_destroy</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_barrier_init.html"><B>pthread_barrier_init</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_barrier_wait.html"><B>pthread_barrier_wait</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_cancel.html"><B>pthread_cancel</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_cleanup_push.html"><B>pthread_cleanup_pop</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_cleanup_push.html"><B>pthread_cleanup_push</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_condattr_init.html"><B>pthread_condattr_destroy</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_condattr_setpshared.html"><B>pthread_condattr_getpshared</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_condattr_init.html"><B>pthread_condattr_init</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_condattr_setpshared.html"><B>pthread_condattr_setpshared</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_cond_init.html"><B>pthread_cond_broadcast</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_cond_init.html"><B>pthread_cond_destroy</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_cond_init.html"><B>pthread_cond_init</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_cond_init.html"><B>pthread_cond_signal</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_cond_init.html"><B>pthread_cond_timedwait</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_cond_init.html"><B>pthread_cond_wait</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_create.html"><B>pthread_create</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_detach.html"><B>pthread_detach</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_equal.html"><B>pthread_equal</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_exit.html"><B>pthread_exit</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_setconcurrency.html"><B>pthread_getconcurrency</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_setschedparam.html"><B>pthread_getschedparam</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_getunique_np.html"><B>pthread_getunique_np</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_key_create.html"><B>pthread_getspecific</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_join.html"><B>pthread_join</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_key_create.html"><B>pthread_key_create</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_key_create.html"><B>pthread_key_delete</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_kill.html"><B>pthread_kill</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_destroy</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_getkind_np</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutexattr_setpshared.html"><B>pthread_mutexattr_getpshared</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_getrobust</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_gettype</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_init</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_setkind_np</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutexattr_setpshared.html"><B>pthread_mutexattr_setpshared</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_setrobust</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_settype</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutex_init.html"><B>pthread_mutex_consistent</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutex_init.html"><B>pthread_mutex_destroy</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutex_init.html"><B>pthread_mutex_init</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutex_init.html"><B>pthread_mutex_lock</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutex_init.html"><B>pthread_mutex_timedlock</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutex_init.html"><B>pthread_mutex_trylock</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_mutex_init.html"><B>pthread_mutex_unlock</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_once.html"><B>pthread_once</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_rwlockattr_init.html"><B>pthread_rwlockattr_destroy</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_rwlockattr_setpshared.html"><B>pthread_rwlockattr_getpshared</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_rwlockattr_init.html"><B>pthread_rwlockattr_init</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_rwlockattr_setpshared.html"><B>pthread_rwlockattr_setpshared</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_rwlock_init.html"><B>pthread_rwlock_destroy</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_rwlock_init.html"><B>pthread_rwlock_init</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_rwlock_rdlock.html"><B>pthread_rwlock_rdlock</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_rwlock_timedrdlock.html"><B>pthread_rwlock_timedrdlock</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_rwlock_timedwrlock.html"><B>pthread_rwlock_timedwrlock</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_rwlock_rdlock.html"><B>pthread_rwlock_tryrdlock</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_rwlock_wrlock.html"><B>pthread_rwlock_trywrlock</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_rwlock_unlock.html"><B>pthread_rwlock_unlock</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_rwlock_wrlock.html"><B>pthread_rwlock_wrlock</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_self.html"><B>pthread_self</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_cancel.html"><B>pthread_setcancelstate</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_cancel.html"><B>pthread_setcanceltype</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_setconcurrency.html"><B>pthread_setconcurrency</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_setschedparam.html"><B>pthread_setschedparam</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_key_create.html"><B>pthread_setspecific</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_kill.html"><B>pthread_sigmask</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_spin_init.html"><B>pthread_spin_destroy</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_spin_init.html"><B>pthread_spin_init</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_spin_lock.html"><B>pthread_spin_lock</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_spin_lock.html"><B>pthread_spin_trylock</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_spin_unlock.html"><B>pthread_spin_unlock</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_cancel.html"><B>pthread_testcancel</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="sched_get_priority_max.html"><B>sched_get_priority_max</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="sched_get_priority_max.html"><B>sched_get_priority_min</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="sched_getscheduler.html"><B>sched_getscheduler</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="sched_setscheduler.html"><B>sched_setscheduler</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="sched_yield.html"><B>sched_yield</B></A></P>
-<P STYLE="margin-left: 0.79in"><B>sem_close</B></P>
-<P STYLE="margin-left: 0.79in"><A HREF="sem_init.html"><B>sem_destroy</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="sem_init.html"><B>sem_getvalue</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="sem_init.html"><B>sem_init</B></A></P>
-<P STYLE="margin-left: 0.79in"><B>sem_open</B></P>
-<P STYLE="margin-left: 0.79in"><A HREF="sem_init.html"><B>sem_post</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="sem_init.html"><B>sem_post_multiple</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="sem_init.html"><B>sem_timedwait</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="sem_init.html"><B>sem_trywait</B></A></P>
-<P STYLE="margin-left: 0.79in"><B>sem_unlink</B></P>
-<P STYLE="margin-left: 0.79in"><A HREF="sem_init.html"><B>sem_wait</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_kill.html"><B>sigwait</B></A></P>
-<H2 CLASS="western"><A HREF="#toc3" NAME="sect3">Non-portable
-Pthreads-w32 routines</A></H2>
-<P STYLE="margin-left: 0.79in"><A HREF="pthreadCancelableWait.html"><B>pthreadCancelableTimedWait</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthreadCancelableWait.html"><B>pthreadCancelableWait</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_delay_np.html"><B>pthread_delay_np</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_getw32threadhandle_np.html"><B>pthread_getw32threadhandle_np</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_num_processors_np.html"><B>pthread_num_processors_np</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_win32_test_features_np.html"><B>pthread_win32_test_features_np</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_timechange_handler_np.html"><B>pthread_timechange_handler_np</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_win32_attach_detach_np.html"><B>pthread_win32_process_attach_np</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_win32_attach_detach_np.html"><B>pthread_win32_process_detach_np</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_win32_attach_detach_np.html"><B>pthread_win32_thread_attach_np</B></A></P>
-<P STYLE="margin-left: 0.79in"><A HREF="pthread_win32_attach_detach_np.html"><B>pthread_win32_thread_detach_np</B></A></P>
-<H2 CLASS="western"><A HREF="#toc4" NAME="sect4">Other</A></H2>
-<P STYLE="margin-left: 0.79in"><A HREF="PortabilityIssues.html"><B>Portability
-issues</B></A></P>
-</BODY>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
+ <TITLE></TITLE>
+ <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.4 (Win32)">
+ <META NAME="CREATED" CONTENT="20050504;17350500">
+ <META NAME="CHANGED" CONTENT="20120819;13095706">
+ <META NAME="CHANGEDBY" CONTENT="Ross Johnson">
+ <META NAME="CHANGEDBY" CONTENT="Ross Johnson">
+ <STYLE TYPE="text/css">
+ <!--
+ H4.cjk { font-family: "AR PL UMing CN" }
+ H4.ctl { font-family: "Lohit Devanagari" }
+ H3.cjk { font-family: "AR PL UMing CN" }
+ H3.ctl { font-family: "Lohit Devanagari" }
+ H2.cjk { font-family: "AR PL UMing CN" }
+ H2.ctl { font-family: "Lohit Devanagari" }
+ -->
+ </STYLE>
+</HEAD>
+<BODY LANG="en-GB" DIR="LTR">
+<H4 CLASS="western">POSIX Threads for Windows &ndash; REFERENCE -
+<A HREF="http://sources.redhat.com/pthreads-win32">Pthreads-w32</A></H4>
+<H3 CLASS="western">Table of Contents</H3>
+<P STYLE="margin-left: 2.01cm"><A HREF="#sect1" NAME="toc1">POSIX
+threads API reference</A><BR><A HREF="#sect2" NAME="toc2">Miscellaneous
+POSIX thread safe routines provided by Pthreads-w32</A><BR><A HREF="#sect3" NAME="toc3">Non-portable
+Pthreads-w32 routines</A><BR><A HREF="#sect4" NAME="toc4">Other</A></P>
+<H2 CLASS="western"><A HREF="#toc1" NAME="sect1">POSIX threads API
+reference</A></H2>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_init.html"><B>pthread_attr_destroy</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_init.html"><B>pthread_attr_getdetachstate</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_init.html"><B>pthread_attr_getinheritsched</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_init.html"><B>pthread_attr_getschedparam</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_init.html"><B>pthread_attr_getschedpolicy</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_init.html"><B>pthread_attr_getscope</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_setstackaddr.html"><B>pthread_attr_getstackaddr</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_setstacksize.html"><B>pthread_attr_getstacksize</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_init.html"><B>pthread_attr_init</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_init.html"><B>pthread_attr_setdetachstate</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_init.html"><B>pthread_attr_setinheritsched</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_init.html"><B>pthread_attr_setschedparam</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_init.html"><B>pthread_attr_setschedpolicy</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_init.html"><B>pthread_attr_setscope</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_setstackaddr.html"><B>pthread_attr_setstackaddr</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_attr_setstacksize.html"><B>pthread_attr_setstacksize</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_barrierattr_init.html"><B>pthread_barrierattr_destroy</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_barrierattr_setpshared.html"><B>pthread_barrierattr_getpshared</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_barrierattr_init.html"><B>pthread_barrierattr_init</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_barrierattr_setpshared.html"><B>pthread_barrierattr_setpshared</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_barrier_init.html"><B>pthread_barrier_destroy</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_barrier_init.html"><B>pthread_barrier_init</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_barrier_wait.html"><B>pthread_barrier_wait</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_cancel.html"><B>pthread_cancel</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_cleanup_push.html"><B>pthread_cleanup_pop</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_cleanup_push.html"><B>pthread_cleanup_push</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_condattr_init.html"><B>pthread_condattr_destroy</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_condattr_setpshared.html"><B>pthread_condattr_getpshared</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_condattr_init.html"><B>pthread_condattr_init</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_condattr_setpshared.html"><B>pthread_condattr_setpshared</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_cond_init.html"><B>pthread_cond_broadcast</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_cond_init.html"><B>pthread_cond_destroy</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_cond_init.html"><B>pthread_cond_init</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_cond_init.html"><B>pthread_cond_signal</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_cond_init.html"><B>pthread_cond_timedwait</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_cond_init.html"><B>pthread_cond_wait</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_create.html"><B>pthread_create</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_detach.html"><B>pthread_detach</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_equal.html"><B>pthread_equal</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_exit.html"><B>pthread_exit</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_setconcurrency.html"><B>pthread_getconcurrency</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_setschedparam.html"><B>pthread_getschedparam</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_getunique_np.html"><B>pthread_getunique_np</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_key_create.html"><B>pthread_getspecific</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_join.html"><B>pthread_join</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_join.html"><B>pthread_timedjoin_np</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_key_create.html"><B>pthread_key_create</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_key_create.html"><B>pthread_key_delete</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_kill.html"><B>pthread_kill</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_destroy</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_getkind_np</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutexattr_setpshared.html"><B>pthread_mutexattr_getpshared</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_getrobust</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_gettype</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_init</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_setkind_np</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutexattr_setpshared.html"><B>pthread_mutexattr_setpshared</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_setrobust</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutexattr_init.html"><B>pthread_mutexattr_settype</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutex_init.html"><B>pthread_mutex_consistent</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutex_init.html"><B>pthread_mutex_destroy</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutex_init.html"><B>pthread_mutex_init</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutex_init.html"><B>pthread_mutex_lock</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutex_init.html"><B>pthread_mutex_timedlock</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutex_init.html"><B>pthread_mutex_trylock</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_mutex_init.html"><B>pthread_mutex_unlock</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_once.html"><B>pthread_once</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_rwlockattr_init.html"><B>pthread_rwlockattr_destroy</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_rwlockattr_setpshared.html"><B>pthread_rwlockattr_getpshared</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_rwlockattr_init.html"><B>pthread_rwlockattr_init</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_rwlockattr_setpshared.html"><B>pthread_rwlockattr_setpshared</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_rwlock_init.html"><B>pthread_rwlock_destroy</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_rwlock_init.html"><B>pthread_rwlock_init</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_rwlock_rdlock.html"><B>pthread_rwlock_rdlock</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_rwlock_timedrdlock.html"><B>pthread_rwlock_timedrdlock</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_rwlock_timedwrlock.html"><B>pthread_rwlock_timedwrlock</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_rwlock_rdlock.html"><B>pthread_rwlock_tryrdlock</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_rwlock_wrlock.html"><B>pthread_rwlock_trywrlock</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_rwlock_unlock.html"><B>pthread_rwlock_unlock</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_rwlock_wrlock.html"><B>pthread_rwlock_wrlock</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_self.html"><B>pthread_self</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_cancel.html"><B>pthread_setcancelstate</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_cancel.html"><B>pthread_setcanceltype</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_setconcurrency.html"><B>pthread_setconcurrency</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_setschedparam.html"><B>pthread_setschedparam</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_key_create.html"><B>pthread_setspecific</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_kill.html"><B>pthread_sigmask</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_spin_init.html"><B>pthread_spin_destroy</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_spin_init.html"><B>pthread_spin_init</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_spin_lock.html"><B>pthread_spin_lock</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_spin_lock.html"><B>pthread_spin_trylock</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_spin_unlock.html"><B>pthread_spin_unlock</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_cancel.html"><B>pthread_testcancel</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="sched_get_priority_max.html"><B>sched_get_priority_max</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="sched_get_priority_max.html"><B>sched_get_priority_min</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="sched_getscheduler.html"><B>sched_getscheduler</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="sched_setscheduler.html"><B>sched_setscheduler</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="sched_yield.html"><B>sched_yield</B></A></P>
+<P STYLE="margin-left: 2.01cm"><B>sem_close</B></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="sem_init.html"><B>sem_destroy</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="sem_init.html"><B>sem_getvalue</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="sem_init.html"><B>sem_init</B></A></P>
+<P STYLE="margin-left: 2.01cm"><B>sem_open</B></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="sem_init.html"><B>sem_post</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="sem_init.html"><B>sem_post_multiple</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="sem_init.html"><B>sem_timedwait</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="sem_init.html"><B>sem_trywait</B></A></P>
+<P STYLE="margin-left: 2.01cm"><B>sem_unlink</B></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="sem_init.html"><B>sem_wait</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_kill.html"><B>sigwait</B></A></P>
+<H2 CLASS="western"><A HREF="#toc3" NAME="sect3">Non-portable
+Pthreads-w32 routines</A></H2>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthreadCancelableWait.html"><B>pthreadCancelableTimedWait</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthreadCancelableWait.html"><B>pthreadCancelableWait</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_delay_np.html"><B>pthread_delay_np</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_getw32threadhandle_np.html"><B>pthread_getw32threadhandle_np</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_num_processors_np.html"><B>pthread_num_processors_np</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_win32_test_features_np.html"><B>pthread_win32_test_features_np</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_timechange_handler_np.html"><B>pthread_timechange_handler_np</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_win32_attach_detach_np.html"><B>pthread_win32_process_attach_np</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_win32_attach_detach_np.html"><B>pthread_win32_process_detach_np</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_win32_attach_detach_np.html"><B>pthread_win32_thread_attach_np</B></A></P>
+<P STYLE="margin-left: 2.01cm"><A HREF="pthread_win32_attach_detach_np.html"><B>pthread_win32_thread_detach_np</B></A></P>
+<H2 CLASS="western"><A HREF="#toc4" NAME="sect4">Other</A></H2>
+<P STYLE="margin-left: 2.01cm"><A HREF="PortabilityIssues.html"><B>Portability
+issues</B></A></P>
+</BODY>
</HTML>
View
273 manual/pthread_join.html
@@ -1,118 +1,155 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
- <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
- <TITLE>PTHREAD_JOIN(3) manual page</TITLE>
- <META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.3 (Linux)">
- <META NAME="CREATED" CONTENT="20050504;18232700">
- <META NAME="CHANGED" CONTENT="20050504;18421400&qu