From b41f74438672dd682bc01ae818cb3da654f22c1e Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 13 Feb 2013 10:41:10 +0100 Subject: Updated to latest CVS version of pthreads --- pthreads/ChangeLog | 352 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 326 insertions(+), 26 deletions(-) (limited to 'pthreads/ChangeLog') diff --git a/pthreads/ChangeLog b/pthreads/ChangeLog index b2396ebf4..fcd364b8b 100644 --- a/pthreads/ChangeLog +++ b/pthreads/ChangeLog @@ -1,3 +1,303 @@ +2012-10-16 Ross Johnson + + * Makefile: Remove SDK environment setting; now needs to be done + explicitly before running any nmake. + * GNUmakefile: Move per command-line ARCH setting to TESTS_ENV. + +2012-10-04 Ross Johnson + + * pthread_tryjoin_np.c: New API + * pthread.c (pthread_try_join_np): Added. + * common.mk (pthread_tryjoin_np): Added. + * pthread.h (pthread_tryjoin_np): Added. + * NEWS: Updated. + * README: Updated. + * ANNOUNCE: Updated. + +2012-10-02 Ross Johnson + + * sched.h (cpu_set_t): Redefined. + * implement.h (_sched_cpu_set_vector_): Created as the private equivalent + of cpu_set. + (pthread_thread_t_.cpuset): Type change. + * sched_setaffinity.c: Reflect changes to cpu_set_t and _sched_cpu_set_vector_. + * pthread_setaffinity.c: Likewise. + * create.c: Likewise. + * pthread_self.c: Likewise. + * ptw32_new.c: Likewise. + +2012-09-28 Ross Johnson + + * pthread.c: pulls all individual source modules into a single + translation unit. + * common.mk: Remove everything related to the non-inlined dll targets. + This removes all the intermediate .c files that #include other .c files + except for pthread.c. + * Makefile: Remove and rename targets; remove or edit variables. All + of this is to remove the intermediate translation unit aggregation + source files. + * GNUmakefile: Likewise. + * attr.c: Removed. + * barrier.c: Removed. + * cancel.c: Removed. + * condvar.c: Removed. + * exit.c: Removed. + * fork.c: Removed. + * misc.c: Removed. + * mutex.c: Removed. + * nonportable.c: Removed. + * private.c: Removed. + * rwlock.c: Removed. + * sched.c: Removed. + * spin.c: Removed. + * sync.c: Removed. + * tsd.c: Removed. + +2012-09-28 Ross Johnson + + * Makefile: expand on rudimentary install target; add DEST_LIB_NAME + variable defaulting to "pthread.lib". + * GNUmakefile: Add install target similar to Makefile with DEST_LIB_NAME + defaulting to "libpthread.a". + +2012-09-28 Daniel Richard. G + + * all: #include; renamed HAVE_PTW32_CONFIG_H define in + build files to HAVE_CONFIG_H since we no longer need a + uniquely-named symbol for this. + * Bmakefile: Removed _WIN32_WINNT assignment from build files since + this is now handled in source. + * Wmakefile: Likewise. + * Makefile: Added mkdir invocations to "install" target. + * common.mk: Elaborated the pthread.$(OBJEXT) dependency list. + * pthread.h: Removed the #include"config.h" bit. + +2012-09-23 Ross Johnson + + * GNUmakefile: Modify "all-tests" to use new targets in tests + GNUmakefile. + * Makefile: Similarly. + +2012-09-22 Daniel Richard. G + + * GNUmakefile: Reordered the command lines in the "help" target + to match the ordering of the targets in the makefile, which IMO + is nicer to the eye; tweaked some of the parentheticals for better + clarity; delete *.manifest files, in case the user just finished + doing an MSVC build. + * Makefile: Use *.static_stamp for the static targets instead of + *.static; added a note re VC++6 and /EHs vs. /EHa; reordered the + targets, and added a number of new ones (e.g. VSE-small-static); + added a note recommending *-inlined and *-small-static to make + things a little easier for users bewildered by the large number of + targets; reworked the all-tests[-cflags] targets so that (1) more + useful targets are built first (the small-static targets make it + easier to track down compilation errors), (2) *-debug build and + test targets can be used, (3) less-useful build/test permutations + are enabled only if EXHAUSTIVE and/or MORE_EXHAUSTIVE is defined, + and (4) /MDd and /MTd are covered too; "nmake all-tests-cflags + EXHAUSTIVE=1 MORE_EXHAUSTIVE=1" takes a few hours to run; moved + some of the VCE targets up, since the pattern in the file was + already to list VCE targets first, then VSE, then VC; actually + touch the stamp file in the stamp targets. + * README.NONPORTABLE: It's "DllMain", not "dllMain". + * common.mk: Start of an attempt to define dependencies for + pthread.$(OBJEXT). + * implement.h: Generalized PTW32_BROKEN_ERRNO into + PTW32_USES_SEPARATE_CRT; don't do the autostatic-anchoring thing + if we're not building the library! + * pthread.h: Moved the PTW32_CDECL bit into sched.h. pthread.h + already #includes sched.h, so the latter is a good place to put + definitions that need to be shared in common; severely simplified + the errno declaration for Open Watcom, made it applicable only to + Open Watcom, and made the comment less ambiguous; updated the long + comment describing PTW32_BROK^WPTW32_USES_SEPARATE_CRT; added + (conditional) declaration of pthread_win32_set_terminate_np(), as + well as ptw32_terminate_handler (so that eh.h doesn't have to get + involved). + * pthread_cond_wait.c: Missed a couple of errno conversions. + * pthread_mutex_consistent.c: Visual Studio (either 2010 or 2008 + Express, don't recall now) actually errored out due to charset + issues in this file, so I've replaced non-ASCII characters with + ASCII approximations. + * ptw32_threadStart.c: Big rewrite of ptw32_threadStart(). + Everything passes with this, except for GCE (and I can't figure + out why). + * sched.h: Moved the PTW32_CDECL section here (and made it + idempotent); need to #include for size_t (one of the test + programs #includes sched.h as the very first thing); moved the + DWORD_PTR definition up, since it groups better with the pid_t + definition; also need ULONG_PTR, don't need PDWORD_PTR; can't use + PTW32_CONFIG_MSVC6, because if you only #include sched.h you + don't get that bit in pthread.h; use a cpp symbol + (PTW32_HAVE_DWORD_PTR) to inhibit defining *_PTR if needed. Note + that this isn't #defined inside the conditional, because there are + no other instances of these typedefs that need to be disabled, and + sched.h itself is already protected against multiple inclusion; + DWORD_PTR can't be size_t, because (on MSVC6) the former is "unsigned + long" and the latter is "unsigned int" and C++ doesn't see them as + interchangeable; minor edit to the comment... I don't like saying + "VC++" without the "Microsoft" qualifier; use PTW32_CDECL instead of + a literal __cdecl (this was why I moved the PTW32_CDECL bit into this + file). + * semaphore.h: Put in another idempotentized PTW32_CDECL bit here; + use PTW32_CDECL instead of __cdecl, and fixed indentation of function + formal parameters. + +2012-09-21 Ross Johnson + + * create.c: Major changes to incorporate CPU affinity inheritance. + * pthread_self.c: Likewise. + * ptw32_new.c (cpuset): Initialise new pthread_thread_t element. + * pthread.h (DWORD_PTR): Conditional definition moved to sched.h. + * sched.h (DWORD_PTR): As above; other changes. + * sem_post.c: Fix errno handling and restructure. + * sem_getvalue.c: Fix return value and restructure. + +2012-09-18 Ross Johnson + + * sched_setaffinity.c: New API to set process CPU affinity in POSIX + context; compatibility with Linux. + * pthread_setaffinity.c: Likewise. + * implement.h (pthread_t_): Added cpuset element. + * sched.h: Added new prototypes. + * sched.h (cpu_set_t): Support for new process and thread affinity API. + * pthread.h: Added new prototypes. + +2012-09-16 Ross Johnson + + * README (Version numbering): Changes back to major.minor.micro. + * README.NONPORTABLE: Updated description around process/thread + attach/detach routines. + +2012-09-05 Daniel Richard. G + + * implement.h: whitespace adjustment. + * dll.c: Facilitate PTW32_STATIC_LIB being defined in a header file. + +2012-09-04 Ross Johnson + + * Makefile (VCEFLAGS): Changed from /EHsc to /EHs which fixed a problem + in tests/once3.c which was causing it to hang. + +2012-09-03 Ross Johnson + + * Makefile: Remove descriptive info from help target, just list the + available targets. Output tends to be poorly formatted and cluttered + otherwise. + (VCE-static): Add VC++ static build target. + (VCE-small-static): Likewise. + (VCE-small-static-debug): Likewise. + (VCE-small-static-debug): Likewise. + +2012-09-02 Ross Johnson + + * All: correct spelling to 'cancellation'. + +2012-08-31 Ross Johnson + + * pthread_attr_getschedpolicy.c: Remove pedantic arg check. + * pthread_getschedparam.c: Likewise. + * pthread_mutex_timelock.c: Restructure to address unreached final + return statement. + +2012-08-31 Daniel Richard. G + + * implement.h (INLINE): only define if building the inlined make targets. G++ + complained about undefined reference to ptw32_robust_mutex_remove() because it + appears in separate compilation units for "make GCE". + +2012-08-29 Ross Johnson + + * ptw32_MCS_lock.c (ptw32_mcs_flag_wait): Fix cast in first 'if' statement. + * pthread_mutex_consistent.c (comment): Fix awkward grammar. + * pthread_mutexattr_init.c: Initialize robustness element. + +2012-08-29 Daniel Richard. G + + * implement.h (PTW32_INTERLOCKED_SIZE): Define as long or LONGLONG. + (PTW32_INTERLOCKED_SIZEPTR): Define as long* or LONGLONG*. + * pthread_attr_getschedpolicy.c (SCHED_MAX): Fix cast. + * ptw32_mutex_check_need_init.c: Fix static mutexattr_t struct initializations. + * ptw32_threadStart.c (ExceptionFilter): Add cast. + * ptw32_throw.c: Add cast. + +2012-08-18 Ross Johnson + + * pthread_timedjoin_np.c: New non-portable function. + * common.mk (pthread_timedjoin_np): Add new function. + * nonportable.c (pthread_timedjoin_np): Likewise. + +2012-08-16 Daniel Richard. G + + * pthread.h (PTW32_CONFIG_MINGW): Defined to simplify complex macro combination. + * (PTW32_CONFIG_MSVC6): Likewise. + * (PTW32_CONFIG_MSVC8): Likewise. + * autostatic.c: Substitute new macros. + * create.c: Likewise. + * pthread_cond_wait.c: Likewise. + * pthread_exit.c: Likewise. + * pthread_once.c: Likewise. + * pthread_rwlock_timedwrlock.c: Likewise. + * pthread_rwlock_wrlock.c: Likewise. + * pthread_win32_attach_detach_np.c: Likewise. + * ptw32_relmillisecs.c: Likewise. + * ptw32_threadDestroy.c: Likewise. + * ptw32_threadStart.c: Likewise. + * ptw32_throw.c: Likewise. + * sem_timedwait.c: Likewise. + * sem_wait.c: Likewise. + * implement.h: Likewise. + * sched.h: Likewise. + +2012-08-11 Ross Johnson + + * common.mk (default_target): restore previous behaviour of outputing + useful help when "make" is run without a target argument. + +2012-08-11 Daniel Richard. G + + * autostatic.c (ptw32_autostatic_anchor): new function; other + changes aimed at de-abstracting functionality. + * impliment.h (ptw32_autostatic_anchor): dummy reference to + ensure that autostatic.o is always linked into static applications. + * GNUmakefile: Various improvements. + * Makefile: Likewise. + +2012-03-19 Ross Johnson + + * implement.h: Fix interlocked pointer casting under VC++ x64. + +2012-03-19 Ross Johnson + + * implement.h (ptw32_spinlock_check_need_init): added missing + forward declaration. + +2012-07-19 Daniel Richard. G + + * common.mk: New; macros common to all build environment makefiles. + * Bmakefile: Include new common.mk + * Makefile: Likewise; various fixes; added normal and small objects + static build. + * GNUmakefile: Likewise. + +2012-03-18 Ross Johnson + + * create.c (pthread_create): add __cdecl attribute to thread routine + arg + * implement.h (pthread_key_t): add __cdecl attribute to destructor + element + (ThreadParms): likewise for start element + * pthread.h (pthread_create): add __cdecl to prototype start arg + (pthread_once): likewise for init_routine arg + (pthread_key_create): likewise for destructor arg + (ptw32_cleanup_push): replace type of routine arg with previously + defined ptw32_cleanup_callback_t + * pthread_key_create.c: add __cdecl attribute to destructor arg + * pthread_once.c: add __cdecl attribute to init_routine arg + * ptw32_threadStart.c (start): add __cdecl to start variable type + + 2011-07-06 Ross Johnson * pthread_cond_wait.c (pragma inline_depth): this is almost redundant @@ -345,7 +645,7 @@ 2007-01-06 Romano Paolo Tenca * pthread_cond_destroy.c: Replace sem_wait() with non-cancelable - ptw32_semwait() since pthread_cond_destroy() is not a cancelation + ptw32_semwait() since pthread_cond_destroy() is not a cancellation point. * implement.h (ptw32_spinlock_check_need_init): Add prototype. * ptw32_MCS_lock.c: Reverse order of includes. @@ -627,11 +927,11 @@ This uses late initialisation similar to the technique already used for pthreads-win32 mutexes and semaphores (from Alexander Terekhov). - The subsequent cancelation cleanup additions (by rpj) could not be implemented + The subsequent cancellation cleanup additions (by rpj) could not be implemented without sacrificing some of the efficiency in Gottlob's design. In particular, although each once_control uses it's own event to block on, a global CS is required to manage it - since the event must be either re-usable or - re-creatable under cancelation. This is not needed in the non-cancelable + re-creatable under cancellation. This is not needed in the non-cancelable design because it is able to mark the event as closed (forever). When uncontested, a CS operation is equivalent to an Interlocked operation @@ -746,7 +1046,7 @@ 'PThreadStateCancelPending' state as short cut to avoid entering kernel space via WaitForSingleObject() call. This was obviated by user space sema acquisition in sem_wait() and sem_timedwait(), - which are also cancelation points. A call to pthread_testcancel() + which are also cancellation points. A call to pthread_testcancel() was required, which introduced a kernel call, effectively nullifying any gains made by the user space sem acquisition checks. * pthread_cancel.c (pthread_cancel): Set new thread @@ -768,7 +1068,7 @@ being the address of the thread struct. The new pthread_t retains the reuse stack but provides virtually unique thread IDs. * sem_wait.c (ptw32_sem_wait_cleanup): New routine used for - cancelation cleanup. + cancellation cleanup. * sem_timedwait.c (ptw32_sem_timedwait_cleanup): Likewise. 2004-10-22 Ross Johnson @@ -808,12 +1108,12 @@ keeps it's own counter. Although the motivation to do this has existed for a long time, credit goes to Alexander Terekhov for providing the logic. I have deviated slightly from AT's logic to add the waiters - count, which has made the code more complicated by adding cancelation + count, which has made the code more complicated by adding cancellation cleanup. This also appears to have broken the VCE (C++ EH) version of the library (the same problem as previously reported - see BUGS #2), only apparently not fixable using the usual workaround, nor by turning all optimisation off. The GCE version works fine, so it is presumed to - be a bug in MSVC++ 6.0. The cancelation exception is thrown and caught + be a bug in MSVC++ 6.0. The cancellation exception is thrown and caught correctly, but the cleanup class destructor is never called. The failing test is tests\semaphore4.c. * sem_wait.c (sem_wait): Implemented user space check model. @@ -1016,15 +1316,15 @@ * pthread_cancel.c (pthread_cancel): Adapted to use auto-detected QueueUserAPCEx features at run-time. - (ptw32_RegisterCancelation): Drop in replacement for QueueUserAPCEx() + (ptw32_Registercancellation): Drop in replacement for QueueUserAPCEx() if it can't be used. Provides older style non-preemptive async - cancelation. + cancellation. * pthread_win32_attach_detach_np.c (pthread_win32_attach_np): Auto-detect quserex.dll and the availability of alertdrv.sys; initialise and close on process attach/detach. - * global.c (ptw32_register_cancelation): Pointer to either - QueueUserAPCEx() or ptw32_RegisterCancelation() depending on - availability. QueueUserAPCEx makes pre-emptive async cancelation + * global.c (ptw32_register_cancellation): Pointer to either + QueueUserAPCEx() or ptw32_Registercancellation() depending on + availability. QueueUserAPCEx makes pre-emptive async cancellation possible. * implement.h: Add definitions and prototypes related to QueueUserAPC. @@ -1034,7 +1334,7 @@ APC feature. * pthread_cancel.c (pthread_cancel): Initial integration of QueueUserAPCEx into pthreads-win32 to provide true pre-emptive - async cancelation of threads, including blocked threads. + async cancellation of threads, including blocked threads. 2004-05-06 Makoto Kato @@ -1141,7 +1441,7 @@ 2003-09-03 Ross Johnson - * w32_cancelableWait.c (ptw32_cancelable_wait): Allow cancelation + * w32_cancelableWait.c (ptw32_cancelable_wait): Allow cancellation of implicit POSIX threads as well. 2003-09-02 Ross Johnson @@ -1557,7 +1857,7 @@ 2002-02-07 Alexander Terekhov * nonportable.c (pthread_delay_np): Make a true - cancelation point. Deferred cancels will interrupt the + cancellation point. Deferred cancels will interrupt the wait. 2002-02-07 Ross Johnson * cancel.c: Rearranged some code and introduced checks - to disable cancelation at the start of a thread's cancelation - run to prevent double cancelation. The main problem + to disable cancellation at the start of a thread's cancellation + run to prevent double cancellation. The main problem arises if a thread is canceling and then receives a subsequent async cancel request. * private.c: Likewise. @@ -1732,7 +2032,7 @@ * pthread.h: Unless the build explicitly defines __CLEANUP_SEH, __CLEANUP_CXX, or __CLEANUP_C, then the build defaults to __CLEANUP_C style cleanup. This style uses setjmp/longjmp - in the cancelation and thread exit implementations and therefore + in the cancellation and thread exit implementations and therefore won't do stack unwinding if linked to applications that have it (e.g. C++ apps). This is currently consistent with most/all commercial Unix POSIX threads implementations. @@ -1919,7 +2219,7 @@ 2001-07-15 Ross Johnson * rwlock.c (pthread_rwlock_wrlock): Is allowed to be - a cancelation point; re-enable deferred cancelability + a cancellation point; re-enable deferred cancelability around the CV call. 2001-07-10 Ross Johnson @@ -1982,8 +2282,8 @@ for this object. * pthread.h (PTHREAD_BARRIER_INITIALIZER): Removed. * rwlock.c (pthread_rwlock_wrlock): This routine is - not a cancelation point - disable deferred - cancelation around call to pthread_cond_wait(). + not a cancellation point - disable deferred + cancellation around call to pthread_cond_wait(). 2001-07-05 Ross Johnson @@ -2235,7 +2535,7 @@ * (pthread_mutex_lock): Likewise. * (pthread_mutex_trylock): Likewise. * (pthread_mutex_unlock): Likewise. - * Use longjmp/setjmp to implement cancelation when building the library + * Use longjmp/setjmp to implement cancellation when building the library using a C compiler which doesn't support exceptions, e.g. gcc -x c (note that gcc -x c++ uses exceptions). * Also fixed some of the same typos and eliminated PT_STDCALL as @@ -2563,7 +2863,7 @@ * pthread.h: Add compile-time message when using MSC_VER compiler and C++ EH to warn application programmers to use PtW32Catch instead of catch(...) - if they want cancelation and pthread_exit to work. + if they want cancellation and pthread_exit to work. * implement.h: Remove #include ; we use our own local semaphore.h. @@ -2611,7 +2911,7 @@ * pthread.h (PtW32CatchAll): Add macro. When compiling applications using VC++ with C++ EH rather than SEH 'PtW32CatchAll' must be used in place of any 'catch( ... )' - if the application wants pthread cancelation or + if the application wants pthread cancellation or pthread_exit() to work. 2000-08-03 Ross Johnson @@ -2845,7 +3145,7 @@ 1999-11-10 Ross Johnson - * sync.c (pthread_join): Make it a deferred cancelation point. + * sync.c (pthread_join): Make it a deferred cancellation point. * misc.c (pthread_self): Explicitly initialise implicitly created thread state to default values. @@ -4574,7 +4874,7 @@ Sun Jul 26 00:09:59 1998 Ross Johnson a part of making the eventual pthreads DLL binary compatible through version changes. - * condvar.c (cond_wait): Add cancelation point. This applies the + * condvar.c (cond_wait): Add cancellation point. This applies the point to both pthread_cond_wait() and pthread_cond_timedwait(). * exit.c (pthread_exit): Rename "this" to "us". -- cgit v1.2.3