From 40f2c563eac59745d95d9ea06cd9dea64fa49c3b Mon Sep 17 00:00:00 2001 From: Ross Johnson Date: Wed, 1 Aug 2018 09:39:50 +1000 Subject: [PATCH] Licence change, references to new name and repository. --- ANNOUNCE | 149 +- BUGS | 20 - ChangeLog | 8 + GNUmakefile.in | 48 +- NEWS | 38 +- PROGRESS | 2 +- README | 41 +- README.NONPORTABLE | 1720 ++++++++++---------- _ptw32.h | 39 +- aclocal.m4 | 48 +- cleanup.c | 41 +- configure.ac | 48 +- context.h | 39 +- create.c | 33 +- dll.c | 33 +- errno.c | 33 +- global.c | 33 +- implement.h | 32 +- manual/ChangeLog | 8 +- manual/PortabilityIssues.html | 10 +- manual/cpu_set.html | 2 +- manual/index.html | 8 +- manual/pthreadCancelableWait.html | 4 +- manual/pthread_attr_init.html | 658 ++++---- manual/pthread_attr_setstackaddr.html | 326 ++-- manual/pthread_attr_setstacksize.html | 8 +- manual/pthread_barrier_init.html | 8 +- manual/pthread_barrier_wait.html | 6 +- manual/pthread_barrierattr_init.html | 6 +- manual/pthread_barrierattr_setpshared.html | 10 +- manual/pthread_cancel.html | 14 +- manual/pthread_cleanup_push.html | 4 +- manual/pthread_cond_init.html | 6 +- manual/pthread_condattr_init.html | 6 +- manual/pthread_condattr_setpshared.html | 10 +- manual/pthread_create.html | 226 +-- manual/pthread_delay_np.html | 4 +- manual/pthread_detach.html | 4 +- manual/pthread_equal.html | 124 +- manual/pthread_exit.html | 140 +- manual/pthread_getunique_np.html | 6 +- manual/pthread_getw32threadhandle_np.html | 4 +- manual/pthread_join.html | 4 +- manual/pthread_key_create.html | 6 +- manual/pthread_kill.html | 14 +- manual/pthread_mutex_init.html | 8 +- manual/pthread_mutexattr_init.html | 10 +- manual/pthread_mutexattr_setpshared.html | 6 +- manual/pthread_num_processors_np.html | 4 +- manual/pthread_once.html | 4 +- manual/pthread_rwlock_init.html | 8 +- manual/pthread_rwlock_rdlock.html | 10 +- manual/pthread_rwlock_timedrdlock.html | 6 +- manual/pthread_rwlock_timedwrlock.html | 6 +- manual/pthread_rwlock_unlock.html | 8 +- manual/pthread_rwlock_wrlock.html | 8 +- manual/pthread_rwlockattr_init.html | 6 +- manual/pthread_rwlockattr_setpshared.html | 8 +- manual/pthread_self.html | 8 +- manual/pthread_setaffinity_np.html | 6 +- manual/pthread_setcancelstate.html | 16 +- manual/pthread_setcanceltype.html | 16 +- manual/pthread_setconcurrency.html | 6 +- manual/pthread_setname_np.html | 2 +- manual/pthread_setschedparam.html | 6 +- manual/pthread_spin_init.html | 10 +- manual/pthread_spin_lock.html | 6 +- manual/pthread_spin_unlock.html | 8 +- manual/pthread_timechange_handler_np.html | 4 +- manual/pthread_win32_attach_detach_np.html | 8 +- manual/pthread_win32_getabstime_np.html | 4 +- manual/pthread_win32_test_features_np.html | 4 +- manual/sched_get_priority_max.html | 4 +- manual/sched_getscheduler.html | 6 +- manual/sched_setaffinity.html | 6 +- manual/sched_setscheduler.html | 6 +- manual/sched_yield.html | 2 +- manual/sem_init.html | 8 +- pthread.c | 33 +- pthread.h | 41 +- pthread_attr_destroy.c | 39 +- pthread_attr_getaffinity_np.c | 39 +- pthread_attr_getdetachstate.c | 39 +- pthread_attr_getinheritsched.c | 39 +- pthread_attr_getname_np.c | 105 +- pthread_attr_getschedparam.c | 39 +- pthread_attr_getschedpolicy.c | 39 +- pthread_attr_getscope.c | 39 +- pthread_attr_getstackaddr.c | 33 +- pthread_attr_getstacksize.c | 33 +- pthread_attr_init.c | 33 +- pthread_attr_setaffinity_np.c | 39 +- pthread_attr_setdetachstate.c | 39 +- pthread_attr_setinheritsched.c | 39 +- pthread_attr_setname_np.c | 195 ++- pthread_attr_setschedparam.c | 39 +- pthread_attr_setschedpolicy.c | 39 +- pthread_attr_setscope.c | 39 +- pthread_attr_setstackaddr.c | 33 +- pthread_attr_setstacksize.c | 33 +- pthread_barrier_destroy.c | 39 +- pthread_barrier_init.c | 39 +- pthread_barrier_wait.c | 39 +- pthread_barrierattr_destroy.c | 39 +- pthread_barrierattr_getpshared.c | 39 +- pthread_barrierattr_init.c | 39 +- pthread_barrierattr_setpshared.c | 39 +- pthread_cancel.c | 33 +- pthread_cond_destroy.c | 39 +- pthread_cond_init.c | 39 +- pthread_cond_signal.c | 39 +- pthread_cond_wait.c | 39 +- pthread_condattr_destroy.c | 39 +- pthread_condattr_getpshared.c | 39 +- pthread_condattr_init.c | 39 +- pthread_condattr_setpshared.c | 39 +- pthread_delay_np.c | 39 +- pthread_detach.c | 39 +- pthread_equal.c | 39 +- pthread_exit.c | 39 +- pthread_getconcurrency.c | 39 +- pthread_getname_np.c | 33 +- pthread_getschedparam.c | 33 +- pthread_getspecific.c | 39 +- pthread_getunique_np.c | 39 +- pthread_getw32threadhandle_np.c | 39 +- pthread_join.c | 39 +- pthread_key_create.c | 39 +- pthread_key_delete.c | 33 +- pthread_kill.c | 39 +- pthread_mutex_consistent.c | 39 +- pthread_mutex_destroy.c | 39 +- pthread_mutex_init.c | 33 +- pthread_mutex_lock.c | 53 +- pthread_mutex_timedlock.c | 55 +- pthread_mutex_trylock.c | 55 +- pthread_mutex_unlock.c | 55 +- pthread_mutexattr_destroy.c | 39 +- pthread_mutexattr_getkind_np.c | 39 +- pthread_mutexattr_getpshared.c | 39 +- pthread_mutexattr_getrobust.c | 39 +- pthread_mutexattr_gettype.c | 39 +- pthread_mutexattr_init.c | 39 +- pthread_mutexattr_setkind_np.c | 39 +- pthread_mutexattr_setpshared.c | 39 +- pthread_mutexattr_setrobust.c | 39 +- pthread_mutexattr_settype.c | 39 +- pthread_num_processors_np.c | 39 +- pthread_once.c | 39 +- pthread_rwlock_destroy.c | 39 +- pthread_rwlock_init.c | 39 +- pthread_rwlock_rdlock.c | 39 +- pthread_rwlock_timedrdlock.c | 39 +- pthread_rwlock_timedwrlock.c | 39 +- pthread_rwlock_tryrdlock.c | 39 +- pthread_rwlock_trywrlock.c | 39 +- pthread_rwlock_unlock.c | 39 +- pthread_rwlock_wrlock.c | 39 +- pthread_rwlockattr_destroy.c | 39 +- pthread_rwlockattr_getpshared.c | 39 +- pthread_rwlockattr_init.c | 39 +- pthread_rwlockattr_setpshared.c | 39 +- pthread_self.c | 33 +- pthread_setaffinity.c | 483 +++--- pthread_setcancelstate.c | 39 +- pthread_setcanceltype.c | 39 +- pthread_setconcurrency.c | 39 +- pthread_setname_np.c | 33 +- pthread_setschedparam.c | 33 +- pthread_setspecific.c | 39 +- pthread_spin_destroy.c | 39 +- pthread_spin_init.c | 39 +- pthread_spin_lock.c | 39 +- pthread_spin_trylock.c | 39 +- pthread_spin_unlock.c | 39 +- pthread_testcancel.c | 39 +- pthread_timechange_handler_np.c | 39 +- pthread_timedjoin_np.c | 373 +++-- pthread_tryjoin_np.c | 343 ++-- pthread_win32_attach_detach_np.c | 33 +- ptw32_MCS_lock.c | 33 +- ptw32_callUserDestroyRoutines.c | 39 +- ptw32_calloc.c | 39 +- ptw32_cond_check_need_init.c | 39 +- ptw32_getprocessors.c | 39 +- ptw32_is_attr.c | 39 +- ptw32_mutex_check_need_init.c | 39 +- ptw32_new.c | 33 +- ptw32_processInitialize.c | 33 +- ptw32_processTerminate.c | 39 +- ptw32_relmillisecs.c | 33 +- ptw32_reuse.c | 39 +- ptw32_rwlock_cancelwrwait.c | 39 +- ptw32_rwlock_check_need_init.c | 39 +- ptw32_semwait.c | 33 +- ptw32_spinlock_check_need_init.c | 39 +- ptw32_threadDestroy.c | 39 +- ptw32_threadStart.c | 33 +- ptw32_throw.c | 39 +- ptw32_timespec.c | 33 +- ptw32_tkAssocCreate.c | 39 +- ptw32_tkAssocDestroy.c | 39 +- sched.h | 33 +- sched_get_priority_max.c | 39 +- sched_get_priority_min.c | 39 +- sched_getscheduler.c | 39 +- sched_setaffinity.c | 701 ++++---- sched_setscheduler.c | 39 +- sched_yield.c | 39 +- sem_close.c | 39 +- sem_destroy.c | 39 +- sem_getvalue.c | 39 +- sem_init.c | 39 +- sem_open.c | 39 +- sem_post.c | 39 +- sem_post_multiple.c | 39 +- sem_timedwait.c | 39 +- sem_trywait.c | 39 +- sem_unlink.c | 39 +- sem_wait.c | 39 +- semaphore.h | 33 +- signal.c | 39 +- tests/Bmakefile | 2 +- tests/ChangeLog | 4 + tests/GNUmakefile.in | 48 +- tests/Makefile | 2 +- tests/Wmakefile | 2 +- tests/affinity1.c | 249 ++- tests/affinity2.c | 231 ++- tests/affinity3.c | 237 ++- tests/affinity4.c | 179 +- tests/affinity5.c | 245 ++- tests/affinity6.c | 235 ++- tests/barrier1.c | 39 +- tests/barrier2.c | 39 +- tests/barrier3.c | 39 +- tests/barrier4.c | 39 +- tests/barrier5.c | 39 +- tests/barrier6.c | 39 +- tests/benchlib.c | 39 +- tests/benchtest.h | 39 +- tests/benchtest1.c | 39 +- tests/benchtest2.c | 39 +- tests/benchtest3.c | 39 +- tests/benchtest4.c | 39 +- tests/benchtest5.c | 39 +- tests/cancel1.c | 39 +- tests/cancel2.c | 39 +- tests/cancel3.c | 39 +- tests/cancel4.c | 39 +- tests/cancel5.c | 39 +- tests/cancel6a.c | 35 +- tests/cancel6d.c | 35 +- tests/cancel7.c | 39 +- tests/cancel8.c | 39 +- tests/cancel9.c | 39 +- tests/cleanup0.c | 39 +- tests/cleanup1.c | 39 +- tests/cleanup2.c | 39 +- tests/cleanup3.c | 39 +- tests/common.mk | 118 +- tests/condvar1.c | 39 +- tests/condvar1_1.c | 39 +- tests/condvar1_2.c | 39 +- tests/condvar2.c | 39 +- tests/condvar2_1.c | 39 +- tests/condvar3.c | 39 +- tests/condvar3_1.c | 39 +- tests/condvar3_2.c | 39 +- tests/condvar3_3.c | 39 +- tests/condvar4.c | 39 +- tests/condvar5.c | 39 +- tests/condvar6.c | 39 +- tests/condvar7.c | 39 +- tests/condvar8.c | 39 +- tests/condvar9.c | 39 +- tests/context1.c | 39 +- tests/context2.c | 316 ++-- tests/count1.c | 39 +- tests/create1.c | 39 +- tests/create2.c | 39 +- tests/create3.c | 39 +- tests/delay1.c | 39 +- tests/delay2.c | 39 +- tests/detach1.c | 39 +- tests/equal1.c | 39 +- tests/errno1.c | 39 +- tests/exception1.c | 33 +- tests/exception2.c | 39 +- tests/exception3.c | 39 +- tests/exception3_0.c | 377 +++-- tests/exit1.c | 39 +- tests/exit2.c | 39 +- tests/exit3.c | 39 +- tests/exit4.c | 39 +- tests/exit5.c | 39 +- tests/eyal1.c | 39 +- tests/inherit1.c | 39 +- tests/join0.c | 39 +- tests/join1.c | 39 +- tests/join2.c | 39 +- tests/join3.c | 39 +- tests/join4.c | 159 +- tests/kill1.c | 39 +- tests/mutex1.c | 39 +- tests/mutex1e.c | 39 +- tests/mutex1n.c | 39 +- tests/mutex1r.c | 39 +- tests/mutex2.c | 39 +- tests/mutex2e.c | 39 +- tests/mutex2r.c | 39 +- tests/mutex3.c | 39 +- tests/mutex3e.c | 39 +- tests/mutex3r.c | 39 +- tests/mutex4.c | 39 +- tests/mutex5.c | 39 +- tests/mutex6.c | 39 +- tests/mutex6e.c | 39 +- tests/mutex6es.c | 39 +- tests/mutex6n.c | 39 +- tests/mutex6r.c | 39 +- tests/mutex6rs.c | 39 +- tests/mutex6s.c | 39 +- tests/mutex7.c | 39 +- tests/mutex7e.c | 39 +- tests/mutex7n.c | 39 +- tests/mutex7r.c | 39 +- tests/mutex8.c | 35 +- tests/mutex8e.c | 35 +- tests/mutex8n.c | 35 +- tests/mutex8r.c | 35 +- tests/name_np1.c | 33 +- tests/name_np2.c | 217 ++- tests/once1.c | 39 +- tests/once2.c | 39 +- tests/once3.c | 39 +- tests/once4.c | 39 +- tests/priority1.c | 39 +- tests/priority2.c | 39 +- tests/reuse1.c | 39 +- tests/reuse2.c | 39 +- tests/robust1.c | 39 +- tests/robust2.c | 39 +- tests/robust3.c | 39 +- tests/robust4.c | 39 +- tests/robust5.c | 39 +- tests/runorder.mk | 318 ++-- tests/rwlock1.c | 39 +- tests/rwlock2.c | 39 +- tests/rwlock2_t.c | 39 +- tests/rwlock3.c | 39 +- tests/rwlock3_t.c | 39 +- tests/rwlock4.c | 39 +- tests/rwlock4_t.c | 39 +- tests/rwlock5.c | 39 +- tests/rwlock5_t.c | 39 +- tests/rwlock6.c | 39 +- tests/rwlock6_t.c | 39 +- tests/rwlock6_t2.c | 39 +- tests/self1.c | 39 +- tests/self2.c | 39 +- tests/semaphore1.c | 39 +- tests/semaphore2.c | 39 +- tests/semaphore3.c | 39 +- tests/semaphore4.c | 39 +- tests/semaphore4t.c | 39 +- tests/semaphore5.c | 39 +- tests/sequence1.c | 39 +- tests/spin1.c | 39 +- tests/spin2.c | 39 +- tests/spin3.c | 39 +- tests/spin4.c | 39 +- tests/stress1.c | 39 +- tests/test.h | 33 +- tests/threestage.c | 1166 ++++++------- tests/timeouts.c | 501 +++--- tests/tryentercs.c | 39 +- tests/tryentercs2.c | 39 +- tests/tsd1.c | 39 +- tests/tsd2.c | 39 +- tests/tsd3.c | 39 +- tests/valid1.c | 39 +- tests/valid2.c | 39 +- version.rc | 47 +- w32_CancelableWait.c | 39 +- 385 files changed, 10507 insertions(+), 11442 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 6ae796e4..2eaee8d9 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,37 +1,44 @@ -PTHREADS4W RELEASE 3.0.0 (2016-12-20) +PTHREADS4W RELEASE 3.0.0 (2017-01-01) -------------------------------------- -Web Site: http://sourceforge.net/projects/pthreads4w/ - http://sourceware.org/pthreads-win32/ -Repository: http://sourceforge.net/p/pthreads4w/code - https://sourceware.org/cgi-bin/cvsweb.cgi/pthreads/?cvsroot=pthreads-win32 -Releases: http://sourceforge.net/projects/pthreads4w/files - ftp://sourceware.org/pub/pthreads-win32 +Web Site: https://sourceforge.net/projects/pthreads4w/ +Repository: https://sourceforge.net/p/pthreads4w/code +Releases: https://sourceforge.net/projects/pthreads4w/files Maintainer: Ross Johnson -We are pleased to announce the availability of a new release of -Pthreads4w (a.k.a. Pthreads-win32), an Open Source Software implementation of the -Threads component of the SUSV3 Standard for Microsoft's -Windows (x86 and x64). Some relevant functions from other sections -of SUSV3 are also supported including semaphores and scheduling -functions. See the Conformance section below for details. +We are pleased to announce the availability of a new release of Pthreads4w +(a.k.a. Pthreads-win32), an Open Source Software implementation of +the Threads component of the SUSV3 Standard for Microsoft's Windows +(x86 and x64). Some relevant functions from other sections of SUSV3 are +also supported including semaphores and scheduling functions. See the +Conformance section below for details. Some common non-portable functions are also implemented for additional compatibility, as are a few functions specific to pthreads4w for easier integration with Windows applications. -Pthreads4w is free software, distributed under the GNU Lesser -General Public License (LGPL). +Pthreads4w is free software. Version 3.0.0 is distributed under the +Apache License version 2.0 (APLv2). The APLv2 is compatible with the GPLv3 +and LGPLv3 licenses and therefore this code may continue to be legally +included within GPLv3 and LGPLv3 projects. -For those who want to try the most recent changes, the SourceForge Git repository -is the one to use. The Sourceware CVS repository is synchronised much less often -and may be abandoned altogether. +All version 1 and 2 releases will remain LGPL but version 2.11 will be +released under v3 of that license so that any modifications to pthreads4w +version 3 code that we backport to v2 will not pollute that code. -Release 2.9.1 was probably the last to provide pre-built libraries. The supported -compilers are now all available free for personal use. The MSVS version should -build out of the box using nmake. The GCC versions now make use of GNU autoconf -to generate a configure script which in turn creates a custom config.h for the -environment you use: MinGW or MinGW64, etc. +Because this license compatibility is not reciprocal, future +modifications to pthreads4w will only be accepted to version 3 (or +later), i.e. the APLv2 code-base. + +For those who want to try the most recent changes, the SourceForge Git +repository is the one to use. The Sourceware CVS repository is synchronised +much less often and may be abandoned altogether. + +Release 2.9.1 was probably the last to provide pre-built libraries. The +supported compilers are now all available free for personal use. The MSVS +version should build out of the box using nmake. The GCC versions now make +use of GNU autoconf to generate a configure script which in turn creates a +custom config.h for the environment you use: MinGW or MinGW64, etc. Acknowledgements @@ -67,7 +74,7 @@ were extracted from it. There is also a separate CONTRIBUTORS file. This file and others are on the web site: - http://sourceware.org/pthreads-win32 + https://sourceforge.net/p/pthreads4w/wiki/Contributors/ As much as possible, the ChangeLog file acknowledges contributions to the code base in more detail. @@ -304,13 +311,9 @@ The following functions are implemented: PTHREAD_MUTEX_TIMED_NP) pthread_num_processors_np pthread_win32_getabstime_np - (The following four routines may be required when linking statically. - The process_* routines should not be needed for MSVC or GCC.) + (The following four routines should no longer be required.) pthread_win32_process_attach_np pthread_win32_process_detach_np - (The following routines should only be needed to manage implicit - POSIX handles i.e. when Win native threads call POSIX thread routines - (other than pthread_create)) pthread_win32_thread_attach_np pthread_win32_thread_detach_np @@ -408,89 +411,10 @@ The following functions are not implemented: rand_r -Availability ------------- - -The prebuilt DLL, export libs (for both MSVC and Mingw32), and the header -files (pthread.h, semaphore.h, sched.h) are available along with the -complete source code. - -The source code can be found at: - - ftp://sources.redhat.com/pub/pthreads-win32 - -and as individual source code files at - - ftp://sources.redhat.com/pub/pthreads-win32/source - -The pre-built DLL, export libraries and include files can be found at: - - ftp://sources.redhat.com/pub/pthreads-win32/dll-latest - - - -Mailing List ------------- - -There is a mailing list for discussing pthreads on Win32. To join, -send email to: - - pthreads-win32-subscribe@sourceware.cygnus.com - - Application Development Environments ------------------------------------ See the README file for more information. - -MSVC: -MSVC using SEH works. Distribute pthreadVSE.dll with your application. -MSVC using C++ EH works. Distribute pthreadVCE.dll with your application. -MSVC using C setjmp/longjmp works. Distribute pthreadVC.dll with your application. - - -Mingw32: -See the FAQ, Questions 6 and 10. - -Mingw using C++ EH works. Distribute pthreadGCE.dll with your application. -Mingw using C setjmp/longjmp works. Distribute pthreadGC.dll with your application. - - -Cygwin: (http://sourceware.cygnus.com/cygwin/) -Developers using Cygwin do not need pthreads-win32 since it has POSIX threads -support. Refer to its documentation for details and extent. - - -UWIN: -UWIN is a complete Unix-like environment for Windows from AT&T. Pthreads-win32 -doesn't currently support UWIN (and vice versa), but that may change in the -future. - -Generally: -For convenience, the following pre-built files are available on the FTP site -(see Availability above): - - pthread.h - for POSIX threads - semaphore.h - for POSIX semaphores - sched.h - for POSIX scheduling - pthreadVCE.dll - built with MSVC++ compiler using C++ EH - pthreadVCE.lib - pthreadVC.dll - built with MSVC compiler using C setjmp/longjmp - pthreadVC.lib - pthreadVSE.dll - built with MSVC compiler using SEH - pthreadVSE.lib - pthreadGCE.dll - built with Mingw32 G++ 2.95.2-1 - pthreadGC.dll - built with Mingw32 GCC 2.95.2-1 using setjmp/longjmp - libpthreadGCE.a - derived from pthreadGCE.dll - libpthreadGC.a - derived from pthreadGC.dll - gcc.dll - needed if distributing applications that use - pthreadGCE.dll (but see the FAQ Q 10 for the latest - related information) - -These are the only files you need in order to build POSIX threads -applications for Win32 using either MSVC or Mingw32. - -See the FAQ file in the source tree for additional information. Documentation @@ -512,15 +436,6 @@ available: By Bradford Nichols, Dick Buttlar & Jacqueline Proulx Farrell O'Reilly (pub) -On the web: see the links at the bottom of the pthreads-win32 site: - - http://sources.redhat.com/pthreads-win32/ - - Currently, there is no documentation included in the package apart - from the copious comments in the source code. - - - Enjoy! Ross Johnson diff --git a/BUGS b/BUGS index 285ba4eb..748e4442 100644 --- a/BUGS +++ b/BUGS @@ -119,23 +119,3 @@ Known bugs in applications relying on cancellation/cleanup AND using optimisations for creation of production code is highly unreliable for the current version of the pthreads library. - -3. The Borland Builder 5.5 version of the library produces memory read exceptions -in some tests. - -4. pthread_barrier_wait() can deadlock if the number of potential calling -threads for a particular barrier is greater than the barrier count parameter -given to pthread_barrier_init() for that barrier. - -This is due to the very lightweight implementation of pthread-win32 barriers. -To cope with more than "count" possible waiters, barriers must effectively -implement all the same safeguards as condition variables, making them much -"heavier" than at present. - -The workaround is to ensure that no more than "count" threads attempt to wait -at the barrier. - -5. Canceling a thread blocked on pthread_once appears not to work in the MSVC++ -version of the library "pthreadVCE.dll". The test case "once3.c" hangs. I have no -clues on this at present. All other versions pass this test ok - pthreadsVC.dll, -pthreadsVSE.dll, pthreadsGC.dll and pthreadsGCE.dll. diff --git a/ChangeLog b/ChangeLog index bcac4f58..2f6822c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2016-12-25 Ross Johnson + + * Change all license notices to the Apache License 2.0 + * LICENCE: New Apache License file + * NOTICE: New file. + * COPYING: Removed. + * COPYING.GPL: Removed. + 2016-12-20 Ross Johnson * implement.h (PThreadStateReuse): this thread state enum value diff --git a/GNUmakefile.in b/GNUmakefile.in index 1b31d68f..e80a3885 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -1,30 +1,30 @@ # @configure_input@ # -------------------------------------------------------------------------- # -# Pthreads-win32 - POSIX Threads Library for Win32 -# Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999,2012 Pthreads-win32 contributors -# -# The current list of contributors is contained -# in the file CONTRIBUTORS included with the source -# code distribution. The list can also be seen at the -# following World Wide Web location: -# http://sources.redhat.com/pthreads-win32/contributors.html -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library in the file COPYING.LIB; -# if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. # PACKAGE = @PACKAGE_TARNAME@ VERSION = @PACKAGE_VERSION@ diff --git a/NEWS b/NEWS index 27958a30..3adcdaf2 100644 --- a/NEWS +++ b/NEWS @@ -1,22 +1,38 @@ RELEASE 3.0.0 -------------- -(2016-12-20) +(2017-01-01) General ------- -Note that this is a new major release and consolidates the already very -stable version 2.10.0. The major version increment introduces two minor -ABI changes along with other naming changes that will require -recompilation of linking applications and possibly some textual changes -to compile-time macro references in configuration and source files, e.g. -PTW32_* to __PTW32_*, etc. +Note that this is a new major release. The major version increment +introduces two ABI changes along with other naming changes that will +require recompilation of linking applications and possibly some textual +changes to compile-time macro references in configuration and source +files, e.g. PTW32_* changes to __PTW32_*, ptw32_* to __ptw32_*, etc. + +License Change +-------------- +Pthreads4w version 3.0.0 is being released under the terms of the Apache +License v2.0. The APLv2 is compatible with the GPLv3 and LGPLv3 licenses +and therefore this code may continue to be legally included within GPLv3 +and LGPLv3 projects. + +Pthreads4w version 2 releases will remain LGPL but version 2.11 will be +released under v3 of that license so that any additions to pthreads4w +version 3 code that we backport to v2 will not pollute that code. + +Because this license compatibility is not reciprocal, future +modifications to pthreads4w will only be accepted to version 3 (or +later), i.e. the APLv2 code-base. + +Backporting and Support of Legacy Windows Releases +-------------------------------------------------- +Some changes from 2011-02-26 onward may not be compatible with pre +Windows 2000 systems. New bug fixes in all releases since 2.8.0 have NOT been applied to the 1.x.x series. -Some changes from 2011-02-26 onward may not be compatible with -pre Windows 2000 systems. - Testing and verification ------------------------ The MSVC, MinGW and MinGW64 builds have been tested on SMP architecture @@ -494,7 +510,7 @@ General The package now includes a reference documentation set consisting of HTML formatted Unix-style manual pages that have been edited for consistency with Pthreads-w32. The set can also be read online at: -http://sources.redhat.com/pthreads-win32/manual/index.html +https://sourceforge.net/projects/pthreads4w/manual/index.html Thanks again to Tim Theisen for running the test suite pre-release on an MP system. diff --git a/PROGRESS b/PROGRESS index 9abf0bca..6a1b4e59 100644 --- a/PROGRESS +++ b/PROGRESS @@ -1,4 +1,4 @@ Please see the ANNOUNCE file "Level of Standards Conformance" or the web page: -http://sources.redhat.com/pthreads-win32/conformance.html +https://sourceforge.net/projects/pthreads4w/conformance.html diff --git a/README b/README index 132e173a..d7c81813 100644 --- a/README +++ b/README @@ -1,23 +1,16 @@ -PTHREADS-WIN32 (A.K.A. PTHREADS4W) +PTHREADS4W (a.k.a. PTHREADS-WIN32) ================================== -Pthreads-win32 is free software, distributed under the GNU Lesser -General Public License (LGPL). See the file 'COPYING.LIB' for terms -and conditions. Also see the file 'COPYING' for information -specific to pthreads-win32, copyrights and the LGPL. - - What is it? ----------- -Pthreads-win32 (a.k.a. pthreads4w) is an Open Source Software -implementation of the Threads component of the POSIX 1003.1c 1995 -Standard (or later) for Microsoft's Windows environment. Some functions -from POSIX 1003.1b are also supported, including semaphores. Other -related functions include the set of read-write lock functions. The -library also supports some of the functionality of the Open -Group's Single Unix specification, namely mutex types, plus some common -and pthreads-win32 specific non-portable routines (see README.NONPORTABLE). +Pthreads4w is an Open Source Software implementation of the Threads +component of the POSIX 1003.1c 1995 Standard (or later) for Microsoft's +Windows environment. Some functions from POSIX 1003.1b are also supported, +including semaphores. Other related functions include the set of read-write +lock functions. The library also supports some of the functionality of the +Open Group's Single Unix specification, namely mutex types, plus some common +and pthreads4w specific non-portable routines (see README.NONPORTABLE). See the file "ANNOUNCE" for more information including standards conformance details and the list of supported and unsupported @@ -37,15 +30,15 @@ QueueUserAPCEx by Panagiotis E. Hadjidoukas 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 - self-unpacking ZIP, and on the pthreads-win32 FTP site (in source + Both the DLL and driver are provided with the pthreads4w.exe + self-unpacking ZIP, and on the pthreads4w FTP site (in source and pre-built forms). Currently this is a separate LGPL package to - pthreads-win32. See the README in the QueueUserAPCEx folder for + pthreads4w. See the README in the QueueUserAPCEx folder for installation instructions. - Pthreads-win32 will automatically detect if the QueueUserAPCEx DLL + pthreads4w 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 + loaded. If it is not available, pthreads4w will simulate async cancellation, which means that it can async cancel only threads that are runnable. The simulated async cancellation cannot cancel blocked threads. @@ -139,7 +132,7 @@ Microsoft version numbers use 4 integers: 0.0.0.0 -Pthreads-win32 uses the first 3 following the standard major.minor.micro +Pthreads4w uses the first 3 following the standard major.minor.micro system. We had claimed to follow the Libtool convention but this has not been the case with recent releases. Binary compatibility and consequently library file naming has not changed over this time either @@ -171,14 +164,14 @@ The numbers are changed as follows: DLL compatibility numbering is an attempt to ensure that applications -always load a compatible pthreads-win32 DLL by using a DLL naming system +always load a compatible pthreads4w DLL by using a DLL naming system that is consistent with the version numbering system. It also allows older and newer DLLs to coexist in the same filesystem so that older applications can continue to be used. For pre .NET Windows systems, this inevitably requires incompatible versions of the same DLLs to have different names. -Pthreads-win32 has adopted the Cygwin convention of appending a single +Pthreads4w has adopted the Cygwin convention of appending a single integer number to the DLL name. The number used is simply the library's major version number. @@ -248,7 +241,7 @@ reservation of identifiers beginning with "_" and "__" for use by compiler implementations only. If you have written any applications and you are linking -statically with the pthreads-win32 library then you may have +statically with the pthreads4w library then you may have included a call to _pthread_processInitialize. You will now have to change that to __ptw32_processInitialize. diff --git a/README.NONPORTABLE b/README.NONPORTABLE index cf1c7a13..ea504de5 100644 --- a/README.NONPORTABLE +++ b/README.NONPORTABLE @@ -1,860 +1,860 @@ -This file documents non-portable functions and other issues. - -Non-portable functions included in pthreads-win32 -------------------------------------------------- - -BOOL -pthread_win32_test_features_np(int mask) - - This routine allows an application to check which - run-time auto-detected features are available within - the library. - - The possible features are: - - PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE - Return TRUE if the native version of - InterlockedCompareExchange() is being used. - This feature is not meaningful in recent - library versions as MSVC builds only support - system implemented ICE. Note that all Mingw - builds use inlined asm versions of all the - Interlocked routines. - PTW32_ALERTABLE_ASYNC_CANCEL - Return TRUE is the QueueUserAPCEx package - QUSEREX.DLL is available and the AlertDrv.sys - driver is loaded into Windows, providing - alertable (pre-emptive) asyncronous threads - cancellation. If this feature returns FALSE - then the default async cancel scheme is in - use, which cannot cancel blocked threads. - - Features may be Or'ed into the mask parameter, in which case - the routine returns TRUE if any of the Or'ed features would - return TRUE. At this stage it doesn't make sense to Or features - but it may some day. - - -void * -pthread_timechange_handler_np(void *) - - To improve tolerance against operator or time service - initiated system clock changes. - - This routine can be called by an application when it - receives a WM_TIMECHANGE message from the system. At - present it broadcasts all condition variables so that - waiting threads can wake up and re-evaluate their - conditions and restart their timed waits if required. - - It has the same return type and argument type as a - thread routine so that it may be called directly - through pthread_create(), i.e. as a separate thread. - - Parameters - - Although a parameter must be supplied, it is ignored. - The value NULL can be used. - - Return values - - It can return an error EAGAIN to indicate that not - all condition variables were broadcast for some reason. - Otherwise, 0 is returned. - - If run as a thread, the return value is returned - through pthread_join(). - - The return value should be cast to an integer. - - -HANDLE -pthread_getw32threadhandle_np(pthread_t thread); - - Returns the win32 thread handle that the POSIX - thread "thread" is running as. - - Applications can use the win32 handle to set - win32 specific attributes of the thread. - -DWORD -pthread_getw32threadid_np (pthread_t thread) - - Returns the Windows native thread ID that the POSIX - thread "thread" is running as. - - Only valid when the library is built where - ! (defined(__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__) - and otherwise returns 0. - - -int -pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind) - -int -pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind) - - These two routines are included for Linux compatibility - and are direct equivalents to the standard routines - pthread_mutexattr_settype - pthread_mutexattr_gettype - - pthread_mutexattr_setkind_np accepts the following - mutex kinds: - PTHREAD_MUTEX_FAST_NP - PTHREAD_MUTEX_ERRORCHECK_NP - PTHREAD_MUTEX_RECURSIVE_NP - - These are really just equivalent to (respectively): - PTHREAD_MUTEX_NORMAL - PTHREAD_MUTEX_ERRORCHECK - PTHREAD_MUTEX_RECURSIVE - - -int -pthread_delay_np (const struct timespec *interval) - - This routine causes a thread to delay execution for a specific period of time. - This period ends at the current time plus the specified interval. The routine - will not return before the end of the period is reached, but may return an - arbitrary amount of time after the period has gone by. This can be due to - system load, thread priorities, and system timer granularity. - - 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 cancellation request. - - This routine is a cancellation point. - - The timespec structure contains the following two fields: - - tv_sec is an integer number of seconds. - tv_nsec is an integer number of nanoseconds. - - Return Values - - If an error condition occurs, this routine returns an integer value - indicating the type of error. Possible return values are as follows: - - 0 Successful completion. - [EINVAL] The value specified by interval is invalid. - - -__int64 -pthread_getunique_np (pthread_t thr) - - Returns the unique number associated with thread thr. - The unique numbers are a simple way of positively identifying a thread when - pthread_t cannot be relied upon to identify the true thread instance. I.e. a - pthread_t value may be assigned to different threads throughout the life of a - process. - - Because pthreads4w (pthreads-win32) threads can be uniquely identified by their - pthread_t values this routine is provided only for source code compatibility. - - NOTE: if the library is re-initialised, i.e. by calling pthread_win32_process_detach_np() - followed by pthread_win32_process_attach_np(), then the unique number is reset along with - several other library global values. Library reinitialisation should not be required, - however, some older applications may still call these routines as they were once required to - do when statically linking the library. - -int -pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) - -int -pthread_tryjoin_np (pthread_t thread, void **value_ptr) - - These function is added for compatibility with Linux. - - -int -pthread_num_processors_np (void) - - This routine (found on HPUX systems) returns the number of processors - in the system. This implementation actually returns the number of - processors available to the process, which can be a lower number - than the system's number, depending on the process's affinity mask. - - -BOOL -pthread_win32_process_attach_np (void); - -BOOL -pthread_win32_process_detach_np (void); - -BOOL -pthread_win32_thread_attach_np (void); - -BOOL -pthread_win32_thread_detach_np (void); - - These functions contain the code normally run via DllMain - when the library is used as a dll. As of version 2.9.0 of the - library, static builds using either MSC or GCC will call - pthread_win32_process_* automatically at application startup and - exit respectively. - - pthread_win32_thread_attach_np() is currently a no-op. - - pthread_win32_thread_detach_np() is not a no-op. It cleans up the - implicit pthread handle that is allocated to any thread not started - via pthread_create(). Such non-posix threads should call this routine - when they exit, or call pthread_exit() to both cleanup and exit. - - These functions invariably return TRUE except for - pthread_win32_process_attach_np() which will return FALSE - if pthreads-win32 initialisation fails. - - -int -pthread_attr_getaffinity_np (pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); - -int -pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); - -int -pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t * cpuset); - -int -pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, const cpu_set_t * cpuset); - - Manipulate the CPU affinity of threads. Compatibility with libgcc-based pthreads - implementations. - - -int -pthreadCancelableWait (HANDLE waitHandle); - -int -pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); - - These two functions provide hooks into the pthread_cancel - mechanism that will allow you to wait on a Windows handle - and make it a cancellation point. Both functions block - until either the given w32 handle is signaled, or - pthread_cancel has been called. It is implemented using - WaitForMultipleObjects on 'waitHandle' and a manually - reset w32 event used to implement pthread_cancel. - -int -pthread_getname_np(pthread_t thr, char *name, int len); - -If __PTW32_COMPATIBILITY_BSD or __PTW32_COMPATIBILITY_TRU64 defined -int -pthread_setname_np(pthread_t thr, const char *name, void *arg); - -Otherwise: -int -pthread_setname_np(pthread_t thr, const char *name); - - Set and get thread names. Compatibility. - - -struct timespec * -pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * relative); - - Primarily to facilitate writing unit tests but exported for convenience. - The struct timespec pointed to by the first parameter is modified to represent the - time 'now' plus an optional offset value timespec in a platform optimal way. - Returns the first parameter so is compatible as the struct timespec * parameter in - POSIX timed function calls, e.g. - - struct timespec abstime, reltime = { 0, 5000000 } /* 5 ms */; - pthread_mutex_timedwait(&mtx, pthread_win32_getabstime_np(&abstime, &reltime)); - - -Non-portable issues -------------------- - -Thread priority - - POSIX defines a single contiguous range of numbers that determine a - thread's priority. Win32 defines priority classes and priority - levels relative to these classes. Classes are simply priority base - levels that the defined priority levels are relative to such that, - changing a process's priority class will change the priority of all - of it's threads, while the threads retain the same relativity to each - other. - - A Win32 system defines a single contiguous monotonic range of values - that define system priority levels, just like POSIX. However, Win32 - restricts individual threads to a subset of this range on a - per-process basis. - - The following table shows the base priority levels for combinations - of priority class and priority value in Win32. - - Process Priority Class Thread Priority Level - ----------------------------------------------------------------- - 1 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 2 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 3 IDLE_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 4 IDLE_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 4 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 5 IDLE_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 5 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 5 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 6 IDLE_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 6 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 6 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 7 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 7 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 8 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 8 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 8 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 9 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 9 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 9 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 10 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 10 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 11 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 11 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 11 HIGH_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 12 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 12 HIGH_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 13 HIGH_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 14 HIGH_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 IDLE_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 15 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - 16 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_IDLE - 17 REALTIME_PRIORITY_CLASS -7 - 18 REALTIME_PRIORITY_CLASS -6 - 19 REALTIME_PRIORITY_CLASS -5 - 20 REALTIME_PRIORITY_CLASS -4 - 21 REALTIME_PRIORITY_CLASS -3 - 22 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_LOWEST - 23 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL - 24 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_NORMAL - 25 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL - 26 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST - 27 REALTIME_PRIORITY_CLASS 3 - 28 REALTIME_PRIORITY_CLASS 4 - 29 REALTIME_PRIORITY_CLASS 5 - 30 REALTIME_PRIORITY_CLASS 6 - 31 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL - - Windows NT: Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported. - - - As you can see, the real priority levels available to any individual - Win32 thread are non-contiguous. - - An application using pthreads-win32 should not make assumptions about - the numbers used to represent thread priority levels, except that they - are monotonic between the values returned by sched_get_priority_min() - and sched_get_priority_max(). E.g. Windows 95, 98, NT, 2000, XP make - available a non-contiguous range of numbers between -15 and 15, while - at least one version of WinCE (3.0) defines the minimum priority - (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority - (THREAD_PRIORITY_HIGHEST) as 1. - - Internally, pthreads-win32 maps any priority levels between - THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, - or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to - THREAD_PRIORITY_HIGHEST. Currently, this also applies to - REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 - are supported. - - If it wishes, a Win32 application using pthreads-win32 can use the Win32 - defined priority macros THREAD_PRIORITY_IDLE through - THREAD_PRIORITY_TIME_CRITICAL. - - -The opacity of the pthread_t datatype -------------------------------------- -and possible solutions for portable null/compare/hash, etc ----------------------------------------------------------- - -Because pthread_t is an opague datatype an implementation is permitted to define -pthread_t in any way it wishes. That includes defining some bits, if it is -scalar, or members, if it is an aggregate, to store information that may be -extra to the unique identifying value of the ID. As a result, pthread_t values -may not be directly comparable. - -If you want your code to be portable you must adhere to the following contraints: - -1) Don't assume it is a scalar data type, e.g. an integer or pointer value. There -are several other implementations where pthread_t is also a struct. See our FAQ -Question 11 for our reasons for defining pthread_t as a struct. - -2) You must not compare them using relational or equality operators. You must use -the API function pthread_equal() to test for equality. - -3) Never attempt to reference individual members. - - -The problem - -Certain applications would like to be able to access a scalar pthread_t, -primarily to use as keys into data structures to manage threads or -thread-related data, but this is not possible in a maximally portable and -standards compliant way for current POSIX threads implementations. - -This use is often required because pthread_t values are not unique through -the life of the process and so it is necessary for the application to keep -track of a threads status itself, and ironically this is because they are -scalar types in the first place. - -To my knowledge the only platform that provides a scalar pthread_t that is -unique through the life of a process is Solaris. Other platforms, including -HPUX, will not provide support to applications that do this. - -For implementations that define pthread_t as a scalar, programmers often -employ direct relational and equality operators with pthread_t. This code -will break when ported to a standard-comforming implementation that defines -pthread_t as an aggregate type. - -For implementations that define pthread_t as an aggregate, e.g. a struct, -programmers can use memcmp etc., but then face the prospect that the struct may -include alignment padding bytes or bits as well as extra implementation-specific -members that are not part of the unique identifying value. - -Opacity also means that an implementation is free to change the definition, -which should generally only require that applications be recompiled and relinked, -not rewritten. - - -Doesn't the compiler take care of padding? - -The C89 and later standards only effectively guarantee element-by-element -equivalence following an assignment or pass by value of a struct or union, -therefore undefined areas of any two otherwise equivalent pthread_t instances -can still compare differently, e.g. attempting to compare two such pthread_t -variables byte-by-byte, e.g. memcmp(&t1, &t2, sizeof(pthread_t) may give an -incorrect result. In practice I'm reasonably confident that compilers routinely -also copy the padding bytes, mainly because assignment of unions would be far -too complicated otherwise. But it just isn't guarranteed by the standard. - -Illustration: - -We have two thread IDs t1 and t2 - -pthread_t t1, t2; - -In an application we create the threads and intend to store the thread IDs in an -ordered data structure (linked list, tree, etc) so we need to be able to compare -them in order to insert them initially and also to traverse. - -Suppose pthread_t contains undefined padding bits and our compiler copies our -pthread_t [struct] element-by-element, then for the assignment: - -pthread_t temp = t1; - -temp and t1 will be equivalent and correct but a byte-for-byte comparison such as -memcmp(&temp, &t1, sizeof(pthread_t)) == 0 may not return true as we expect because -the undefined bits may not have the same values in the two variable instances. - -Similarly if passing by value under the same conditions. - -If, on the other hand, the undefined bits are at least constant through every -assignment and pass-by-value then the byte-for-byte comparison -memcmp(&temp, &t1, sizeof(pthread_t)) == 0 will always return the expected result. -How can we force the behaviour we need? - - -Solutions - -Adding new functions to the standard API or as non-portable extentions is -the only reliable to provide the necessary operations. Remember also that -POSIX is not tied to the C language. The most common functions that have -been suggested are: - -pthread_null() -pthread_compare() -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 respect -to pthread_t so that we can be sure our solution is compatible with the -standard. - -What is known or may be deduced from the standard: -1) pthread_t must be able to be passed by value, so it must be a single object. -2) from (1) it must be copyable so cannot embed thread-state information, locks -or other volatile objects required to manage the thread it associates with. -3) pthread_t may carry additional information, e.g. for debugging or to manage -itself. -4) there is an implicit requirement that the size of pthread_t is determinable -at compile-time and size-invariant, because it must be able to copy the object -(i.e. through assignment and pass-by-value). Such copies must be genuine -duplicates, not merely a copy of a pointer to a common instance such as -would be the case if pthread_t were defined as an array. - - -Suppose we define the following function: - -/* This function shall return it's argument */ -pthread_t* pthread_normalize(pthread_t* thread); - -For scalar or aggregate pthread_t types this function would simply zero any bits -within the pthread_t that don't uniquely identify the thread, including padding, -such that client code can return consistent results from operations done on the -result. If the additional bits are a pointer to an associate structure then -this function would ensure that the memory used to store that associate -structure does not leak. With normalization the following compare would be -valid and repeatable: - -memcmp(pthread_normalize(&t1),pthread_normalize(&t2),sizeof(pthread_t)) - -Note 1: such comparisons are intended merely to order and sort pthread_t values -and allow them to index various data structures. They are not intended to reveal -anything about the relationships between threads, like startup order. - -Note 2: the normalized pthread_t is also a valid pthread_t that uniquely -identifies the same thread. - -Advantages: -1) In most existing implementations this function would reduce to a no-op that -emits no additional instructions, i.e after in-lining or optimisation, or if -defined as a macro: -#define pthread_normalise(tptr) (tptr) - -2) This single function allows an application to portably derive -application-level versions of any of the other required functions. - -3) It is a generic function that could enable unanticipated uses. - -Disadvantages: -1) Less efficient than dedicated compare or hash functions for implementations -that include significant extra non-id elements in pthread_t. - -2) Still need to be concerned about padding if copying normalized pthread_t. -See the later section on defining pthread_t to neutralise padding issues. - -Generally a pthread_t may need to be normalized every time it is used, -which could have a significant impact. However, this is a design decision -for the implementor in a competitive environment. An implementation is free -to define a pthread_t in a way that minimises or eliminates padding or -renders this function a no-op. - -Hazards: -1) Pass-by-reference directly modifies 'thread' so the application must -synchronise access or ensure that the pointer refers to a copy. The alternative -of pass-by-value/return-by-value was considered but then this requires two copy -operations, disadvantaging implementations where this function is not a no-op -in terms of speed of execution. This function is intended to be used in high -frequency situations and needs to be efficient, or at least not unnecessarily -inefficient. The alternative also sits awkwardly with functions like memcmp. - -2) [Non-compliant] code that uses relational and equality operators on -arithmetic or pointer style pthread_t types would need to be rewritten, but it -should be rewritten anyway. - - -C implementation of null/compare/hash functions using pthread_normalize(): - -/* In pthread.h */ -pthread_t* pthread_normalize(pthread_t* thread); - -/* In user code */ -/* User-level bitclear function - clear bits in loc corresponding to mask */ -void* bitclear (void* loc, void* mask, size_t count); - -typedef unsigned int hash_t; - -/* User-level hash function */ -hash_t hash(void* ptr, size_t count); - -/* - * User-level pthr_null function - modifies the origin thread handle. - * The concept of a null pthread_t is highly implementation dependent - * and this design may be far from the mark. For example, in an - * implementation "null" may mean setting a special value inside one - * element of pthread_t to mean "INVALID". However, if that value was zero and - * formed part of the id component then we may get away with this design. - */ -pthread_t* pthr_null(pthread_t* tp) -{ - /* - * This should have the same effect as memset(tp, 0, sizeof(pthread_t)) - * We're just showing that we can do it. - */ - void* p = (void*) pthread_normalize(tp); - return (pthread_t*) bitclear(p, p, sizeof(pthread_t)); -} - -/* - * Safe user-level pthr_compare function - modifies temporary thread handle copies - */ -int pthr_compare_safe(pthread_t thread1, pthread_t thread2) -{ - return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); -} - -/* - * Fast user-level pthr_compare function - modifies origin thread handles - */ -int pthr_compare_fast(pthread_t* thread1, pthread_t* thread2) -{ - return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); -} - -/* - * Safe user-level pthr_hash function - modifies temporary thread handle copy - */ -hash_t pthr_hash_safe(pthread_t thread) -{ - return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); -} - -/* - * Fast user-level pthr_hash function - modifies origin thread handle - */ -hash_t pthr_hash_fast(pthread_t thread) -{ - return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); -} - -/* User-level bitclear function - modifies the origin array */ -void* bitclear(void* loc, void* mask, size_t count) -{ - int i; - for (i=0; i < count; i++) { - (unsigned char) *loc++ &= ~((unsigned char) *mask++); - } -} - -/* Donald Knuth hash */ -hash_t hash(void* str, size_t count) -{ - hash_t hash = (hash_t) count; - unsigned int i = 0; - - for(i = 0; i < len; str++, i++) - { - hash = ((hash << 5) ^ (hash >> 27)) ^ (*str); - } - return hash; -} - -/* Example of advantage point (3) - split a thread handle into its id and non-id values */ -pthread_t id = thread, non-id = thread; -bitclear((void*) &non-id, (void*) pthread_normalize(&id), sizeof(pthread_t)); - - -A pthread_t type change proposal to neutralise the effects of padding - -Even if pthread_normalize() is available, padding is still a problem because -the standard only garrantees element-by-element equivalence through -copy operations (assignment and pass-by-value). So padding bit values can -still change randomly after calls to pthread_normalize(). - -[I suspect that most compilers take the easy path and always byte-copy anyway, -partly because it becomes too complex to do (e.g. unions that contain sub-aggregates) -but also because programmers can easily design their aggregates to minimise and -often eliminate padding]. - -How can we eliminate the problem of padding bytes in structs? Could -defining pthread_t as a union rather than a struct provide a solution? - -In fact, the Linux pthread.h defines most of it's pthread_*_t objects (but not -pthread_t itself) as unions, possibly for this and/or other reasons. We'll -borrow some element naming from there but the ideas themselves are well known -- the __align element used to force alignment of the union comes from K&R's -storage allocator example. - -/* Essentially our current pthread_t renamed */ -typedef struct { - struct thread_state_t * __p; - long __x; /* sequence counter */ -} thread_id_t; - -Ensuring that the last element in the above struct is a long ensures that the -overall struct size is a multiple of sizeof(long), so there should be no trailing -padding in this struct or the union we define below. -(Later we'll see that we can handle internal but not trailing padding.) - -/* New pthread_t */ -typedef union { - char __size[sizeof(thread_id_t)]; /* array as the first element */ - thread_id_t __tid; - long __align; /* Ensure that the union starts on long boundary */ -} pthread_t; - -This guarrantees that, during an assignment or pass-by-value, the compiler copies -every byte in our thread_id_t because the compiler guarrantees that the __size -array, which we have ensured is the equal-largest element in the union, retains -equivalence. - -This means that pthread_t values stored, assigned and passed by value will at least -carry the value of any undefined padding bytes along and therefore ensure that -those values remain consistent. Our comparisons will return consistent results and -our hashes of [zero initialised] pthread_t values will also return consistent -results. - -We have also removed the need for a pthread_null() function; we can initialise -at declaration time or easily create our own const pthread_t to use in assignments -later: - -const pthread_t null_tid = {0}; /* braces are required */ - -pthread_t t; -... -t = null_tid; - - -Note that we don't have to explicitly make use of the __size array at all. It's -there just to force the compiler behaviour we want. - - -Partial solutions without a pthread_normalize function - - -An application-level pthread_null and pthread_compare proposal -(and pthread_hash proposal by extention) - -In order to deal with the problem of scalar/aggregate pthread_t type disparity in -portable code I suggest using an old-fashioned union, e.g.: - -Contraints: -- there is no padding, or padding values are preserved through assignment and - pass-by-value (see above); -- there are no extra non-id values in the pthread_t. - - -Example 1: A null initialiser for pthread_t variables... - -typedef union { - unsigned char b[sizeof(pthread_t)]; - pthread_t t; -} init_t; - -const init_t initial = {0}; - -pthread_t tid = initial.t; /* init tid to all zeroes */ - - -Example 2: A comparison function for pthread_t values - -typedef union { - unsigned char b[sizeof(pthread_t)]; - pthread_t t; -} pthcmp_t; - -int pthcmp(pthread_t left, pthread_t right) -{ - /* - * Compare two pthread handles in a way that imposes a repeatable but arbitrary - * ordering on them. - * I.e. given the same set of pthread_t handles the ordering should be the same - * each time but the order has no particular meaning other than that. E.g. - * the ordering does not imply the thread start sequence, or any other - * relationship between threads. - * - * Return values are: - * 1 : left is greater than right - * 0 : left is equal to right - * -1 : left is less than right - */ - int i; - pthcmp_t L, R; - L.t = left; - R.t = right; - for (i = 0; i < sizeof(pthread_t); i++) - { - if (L.b[i] > R.b[i]) - return 1; - else if (L.b[i] < R.b[i]) - return -1; - } - return 0; -} - -It has been pointed out that the C99 standard allows for the possibility that -integer types also may include padding bits, which could invalidate the above -method. This addition to C99 was specifically included after it was pointed -out that there was one, presumably not particularly well known, architecture -that included a padding bit in it's 32 bit integer type. See section 6.2.6.2 -of both the standard and the rationale, specifically the paragraph starting at -line 16 on page 43 of the rationale. - - -An aside - -Certain compilers, e.g. gcc and one of the IBM compilers, include a feature -extention: provided the union contains a member of the same type as the -object then the object may be cast to the union itself. - -We could use this feature to speed up the pthrcmp() function from example 2 -above by directly referencing rather than copying the pthread_t arguments to -the local union variables, e.g.: - -int pthcmp(pthread_t left, pthread_t right) -{ - /* - * Compare two pthread handles in a way that imposes a repeatable but arbitrary - * ordering on them. - * I.e. given the same set of pthread_t handles the ordering should be the same - * each time but the order has no particular meaning other than that. E.g. - * the ordering does not imply the thread start sequence, or any other - * relationship between threads. - * - * Return values are: - * 1 : left is greater than right - * 0 : left is equal to right - * -1 : left is less than right - */ - int i; - for (i = 0; i < sizeof(pthread_t); i++) - { - if (((pthcmp_t)left).b[i] > ((pthcmp_t)right).b[i]) - return 1; - else if (((pthcmp_t)left).b[i] < ((pthcmp_t)right).b[i]) - return -1; - } - return 0; -} - - -Result thus far - -We can't remove undefined bits if they are there in pthread_t already, but we have -attempted to render them inert for comparison and hashing functions by making them -consistent through assignment, copy and pass-by-value. - -Note: Hashing pthread_t values requires that all pthread_t variables be initialised -to the same value (usually all zeros) before being assigned a proper thread ID, i.e. -to ensure that any padding bits are zero, or at least the same value for all -pthread_t. Since all pthread_t values are generated by the library in the first -instance this need not be an application-level operation. - - -Conclusion - -I've attempted to resolve the multiple issues of type opacity and the possible -presence of undefined bits and bytes in pthread_t values, which prevent -applications from comparing or hashing pthread handles. - -Two complimentary partial solutions have been proposed, one an application-level -scheme to handle both scalar and aggregate pthread_t types equally, plus a -definition of pthread_t itself that neutralises padding bits and bytes by -coercing semantics out of the compiler to eliminate variations in the values of -padding bits. - -I have not provided any solution to the problem of handling extra values embedded -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 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. Most of the other desired operations on pthread_t -values (null, compare, hash, etc.) can be trivially derived from this and other -standard functions. +This file documents non-portable functions and other issues. + +Non-portable functions included in pthreads-win32 +------------------------------------------------- + +BOOL +pthread_win32_test_features_np(int mask) + + This routine allows an application to check which + run-time auto-detected features are available within + the library. + + The possible features are: + + PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE + Return TRUE if the native version of + InterlockedCompareExchange() is being used. + This feature is not meaningful in recent + library versions as MSVC builds only support + system implemented ICE. Note that all Mingw + builds use inlined asm versions of all the + Interlocked routines. + PTW32_ALERTABLE_ASYNC_CANCEL + Return TRUE is the QueueUserAPCEx package + QUSEREX.DLL is available and the AlertDrv.sys + driver is loaded into Windows, providing + alertable (pre-emptive) asyncronous threads + cancellation. If this feature returns FALSE + then the default async cancel scheme is in + use, which cannot cancel blocked threads. + + Features may be Or'ed into the mask parameter, in which case + the routine returns TRUE if any of the Or'ed features would + return TRUE. At this stage it doesn't make sense to Or features + but it may some day. + + +void * +pthread_timechange_handler_np(void *) + + To improve tolerance against operator or time service + initiated system clock changes. + + This routine can be called by an application when it + receives a WM_TIMECHANGE message from the system. At + present it broadcasts all condition variables so that + waiting threads can wake up and re-evaluate their + conditions and restart their timed waits if required. + + It has the same return type and argument type as a + thread routine so that it may be called directly + through pthread_create(), i.e. as a separate thread. + + Parameters + + Although a parameter must be supplied, it is ignored. + The value NULL can be used. + + Return values + + It can return an error EAGAIN to indicate that not + all condition variables were broadcast for some reason. + Otherwise, 0 is returned. + + If run as a thread, the return value is returned + through pthread_join(). + + The return value should be cast to an integer. + + +HANDLE +pthread_getw32threadhandle_np(pthread_t thread); + + Returns the win32 thread handle that the POSIX + thread "thread" is running as. + + Applications can use the win32 handle to set + win32 specific attributes of the thread. + +DWORD +pthread_getw32threadid_np (pthread_t thread) + + Returns the Windows native thread ID that the POSIX + thread "thread" is running as. + + Only valid when the library is built where + ! (defined(__MINGW64__) || defined(__MINGW32__)) || defined (__MSVCRT__) || defined (__DMC__) + and otherwise returns 0. + + +int +pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr, int kind) + +int +pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr, int *kind) + + These two routines are included for Linux compatibility + and are direct equivalents to the standard routines + pthread_mutexattr_settype + pthread_mutexattr_gettype + + pthread_mutexattr_setkind_np accepts the following + mutex kinds: + PTHREAD_MUTEX_FAST_NP + PTHREAD_MUTEX_ERRORCHECK_NP + PTHREAD_MUTEX_RECURSIVE_NP + + These are really just equivalent to (respectively): + PTHREAD_MUTEX_NORMAL + PTHREAD_MUTEX_ERRORCHECK + PTHREAD_MUTEX_RECURSIVE + + +int +pthread_delay_np (const struct timespec *interval) + + This routine causes a thread to delay execution for a specific period of time. + This period ends at the current time plus the specified interval. The routine + will not return before the end of the period is reached, but may return an + arbitrary amount of time after the period has gone by. This can be due to + system load, thread priorities, and system timer granularity. + + 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 cancellation request. + + This routine is a cancellation point. + + The timespec structure contains the following two fields: + + tv_sec is an integer number of seconds. + tv_nsec is an integer number of nanoseconds. + + Return Values + + If an error condition occurs, this routine returns an integer value + indicating the type of error. Possible return values are as follows: + + 0 Successful completion. + [EINVAL] The value specified by interval is invalid. + + +__int64 +pthread_getunique_np (pthread_t thr) + + Returns the unique number associated with thread thr. + The unique numbers are a simple way of positively identifying a thread when + pthread_t cannot be relied upon to identify the true thread instance. I.e. a + pthread_t value may be assigned to different threads throughout the life of a + process. + + Because pthreads4w (pthreads-win32) threads can be uniquely identified by their + pthread_t values this routine is provided only for source code compatibility. + + NOTE: if the library is re-initialised, i.e. by calling pthread_win32_process_detach_np() + followed by pthread_win32_process_attach_np(), then the unique number is reset along with + several other library global values. Library reinitialisation should not be required, + however, some older applications may still call these routines as they were once required to + do when statically linking the library. + +int +pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) + +int +pthread_tryjoin_np (pthread_t thread, void **value_ptr) + + These function is added for compatibility with Linux. + + +int +pthread_num_processors_np (void) + + This routine (found on HPUX systems) returns the number of processors + in the system. This implementation actually returns the number of + processors available to the process, which can be a lower number + than the system's number, depending on the process's affinity mask. + + +BOOL +pthread_win32_process_attach_np (void); + +BOOL +pthread_win32_process_detach_np (void); + +BOOL +pthread_win32_thread_attach_np (void); + +BOOL +pthread_win32_thread_detach_np (void); + + These functions contain the code normally run via DllMain + when the library is used as a dll. As of version 2.9.0 of the + library, static builds using either MSC or GCC will call + pthread_win32_process_* automatically at application startup and + exit respectively. + + pthread_win32_thread_attach_np() is currently a no-op. + + pthread_win32_thread_detach_np() is not a no-op. It cleans up the + implicit pthread handle that is allocated to any thread not started + via pthread_create(). Such non-posix threads should call this routine + when they exit, or call pthread_exit() to both cleanup and exit. + + These functions invariably return TRUE except for + pthread_win32_process_attach_np() which will return FALSE + if pthreads-win32 initialisation fails. + + +int +pthread_attr_getaffinity_np (pthread_attr_t * attr, size_t cpusetsize, cpu_set_t * cpuset); + +int +pthread_attr_setaffinity_np (pthread_attr_t * attr, size_t cpusetsize, const cpu_set_t * cpuset); + +int +pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t * cpuset); + +int +pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, const cpu_set_t * cpuset); + + Manipulate the CPU affinity of threads. Compatibility with libgcc-based pthreads + implementations. + + +int +pthreadCancelableWait (HANDLE waitHandle); + +int +pthreadCancelableTimedWait (HANDLE waitHandle, DWORD timeout); + + These two functions provide hooks into the pthread_cancel + mechanism that will allow you to wait on a Windows handle + and make it a cancellation point. Both functions block + until either the given w32 handle is signaled, or + pthread_cancel has been called. It is implemented using + WaitForMultipleObjects on 'waitHandle' and a manually + reset w32 event used to implement pthread_cancel. + +int +pthread_getname_np(pthread_t thr, char *name, int len); + +If __PTW32_COMPATIBILITY_BSD or __PTW32_COMPATIBILITY_TRU64 defined +int +pthread_setname_np(pthread_t thr, const char *name, void *arg); + +Otherwise: +int +pthread_setname_np(pthread_t thr, const char *name); + + Set and get thread names. Compatibility. + + +struct timespec * +pthread_win32_getabstime_np (struct timespec * abstime, const struct timespec * relative); + + Primarily to facilitate writing unit tests but exported for convenience. + The struct timespec pointed to by the first parameter is modified to represent the + time 'now' plus an optional offset value timespec in a platform optimal way. + Returns the first parameter so is compatible as the struct timespec * parameter in + POSIX timed function calls, e.g. + + struct timespec abstime, reltime = { 0, 5000000 } /* 5 ms */; + pthread_mutex_timedwait(&mtx, pthread_win32_getabstime_np(&abstime, &reltime)); + + +Non-portable issues +------------------- + +Thread priority + + POSIX defines a single contiguous range of numbers that determine a + thread's priority. Win32 defines priority classes and priority + levels relative to these classes. Classes are simply priority base + levels that the defined priority levels are relative to such that, + changing a process's priority class will change the priority of all + of it's threads, while the threads retain the same relativity to each + other. + + A Win32 system defines a single contiguous monotonic range of values + that define system priority levels, just like POSIX. However, Win32 + restricts individual threads to a subset of this range on a + per-process basis. + + The following table shows the base priority levels for combinations + of priority class and priority value in Win32. + + Process Priority Class Thread Priority Level + ----------------------------------------------------------------- + 1 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 2 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 3 IDLE_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 4 IDLE_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 4 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 5 IDLE_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 5 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 5 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 6 IDLE_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 6 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 6 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 7 Background NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 7 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 8 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 8 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 8 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 9 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 9 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 9 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 10 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 10 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 11 Foreground NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 11 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 11 HIGH_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 12 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 12 HIGH_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 13 HIGH_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 14 HIGH_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 15 HIGH_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 IDLE_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 15 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + 16 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_IDLE + 17 REALTIME_PRIORITY_CLASS -7 + 18 REALTIME_PRIORITY_CLASS -6 + 19 REALTIME_PRIORITY_CLASS -5 + 20 REALTIME_PRIORITY_CLASS -4 + 21 REALTIME_PRIORITY_CLASS -3 + 22 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_LOWEST + 23 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL + 24 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_NORMAL + 25 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL + 26 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST + 27 REALTIME_PRIORITY_CLASS 3 + 28 REALTIME_PRIORITY_CLASS 4 + 29 REALTIME_PRIORITY_CLASS 5 + 30 REALTIME_PRIORITY_CLASS 6 + 31 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL + + Windows NT: Values -7, -6, -5, -4, -3, 3, 4, 5, and 6 are not supported. + + + As you can see, the real priority levels available to any individual + Win32 thread are non-contiguous. + + An application using pthreads-win32 should not make assumptions about + the numbers used to represent thread priority levels, except that they + are monotonic between the values returned by sched_get_priority_min() + and sched_get_priority_max(). E.g. Windows 95, 98, NT, 2000, XP make + available a non-contiguous range of numbers between -15 and 15, while + at least one version of WinCE (3.0) defines the minimum priority + (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority + (THREAD_PRIORITY_HIGHEST) as 1. + + Internally, pthreads-win32 maps any priority levels between + THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, + or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to + THREAD_PRIORITY_HIGHEST. Currently, this also applies to + REALTIME_PRIORITY_CLASSi even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 + are supported. + + If it wishes, a Win32 application using pthreads-win32 can use the Win32 + defined priority macros THREAD_PRIORITY_IDLE through + THREAD_PRIORITY_TIME_CRITICAL. + + +The opacity of the pthread_t datatype +------------------------------------- +and possible solutions for portable null/compare/hash, etc +---------------------------------------------------------- + +Because pthread_t is an opague datatype an implementation is permitted to define +pthread_t in any way it wishes. That includes defining some bits, if it is +scalar, or members, if it is an aggregate, to store information that may be +extra to the unique identifying value of the ID. As a result, pthread_t values +may not be directly comparable. + +If you want your code to be portable you must adhere to the following contraints: + +1) Don't assume it is a scalar data type, e.g. an integer or pointer value. There +are several other implementations where pthread_t is also a struct. See our FAQ +Question 11 for our reasons for defining pthread_t as a struct. + +2) You must not compare them using relational or equality operators. You must use +the API function pthread_equal() to test for equality. + +3) Never attempt to reference individual members. + + +The problem + +Certain applications would like to be able to access a scalar pthread_t, +primarily to use as keys into data structures to manage threads or +thread-related data, but this is not possible in a maximally portable and +standards compliant way for current POSIX threads implementations. + +This use is often required because pthread_t values are not unique through +the life of the process and so it is necessary for the application to keep +track of a threads status itself, and ironically this is because they are +scalar types in the first place. + +To my knowledge the only platform that provides a scalar pthread_t that is +unique through the life of a process is Solaris. Other platforms, including +HPUX, will not provide support to applications that do this. + +For implementations that define pthread_t as a scalar, programmers often +employ direct relational and equality operators with pthread_t. This code +will break when ported to a standard-comforming implementation that defines +pthread_t as an aggregate type. + +For implementations that define pthread_t as an aggregate, e.g. a struct, +programmers can use memcmp etc., but then face the prospect that the struct may +include alignment padding bytes or bits as well as extra implementation-specific +members that are not part of the unique identifying value. + +Opacity also means that an implementation is free to change the definition, +which should generally only require that applications be recompiled and relinked, +not rewritten. + + +Doesn't the compiler take care of padding? + +The C89 and later standards only effectively guarantee element-by-element +equivalence following an assignment or pass by value of a struct or union, +therefore undefined areas of any two otherwise equivalent pthread_t instances +can still compare differently, e.g. attempting to compare two such pthread_t +variables byte-by-byte, e.g. memcmp(&t1, &t2, sizeof(pthread_t) may give an +incorrect result. In practice I'm reasonably confident that compilers routinely +also copy the padding bytes, mainly because assignment of unions would be far +too complicated otherwise. But it just isn't guarranteed by the standard. + +Illustration: + +We have two thread IDs t1 and t2 + +pthread_t t1, t2; + +In an application we create the threads and intend to store the thread IDs in an +ordered data structure (linked list, tree, etc) so we need to be able to compare +them in order to insert them initially and also to traverse. + +Suppose pthread_t contains undefined padding bits and our compiler copies our +pthread_t [struct] element-by-element, then for the assignment: + +pthread_t temp = t1; + +temp and t1 will be equivalent and correct but a byte-for-byte comparison such as +memcmp(&temp, &t1, sizeof(pthread_t)) == 0 may not return true as we expect because +the undefined bits may not have the same values in the two variable instances. + +Similarly if passing by value under the same conditions. + +If, on the other hand, the undefined bits are at least constant through every +assignment and pass-by-value then the byte-for-byte comparison +memcmp(&temp, &t1, sizeof(pthread_t)) == 0 will always return the expected result. +How can we force the behaviour we need? + + +Solutions + +Adding new functions to the standard API or as non-portable extentions is +the only reliable to provide the necessary operations. Remember also that +POSIX is not tied to the C language. The most common functions that have +been suggested are: + +pthread_null() +pthread_compare() +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 respect +to pthread_t so that we can be sure our solution is compatible with the +standard. + +What is known or may be deduced from the standard: +1) pthread_t must be able to be passed by value, so it must be a single object. +2) from (1) it must be copyable so cannot embed thread-state information, locks +or other volatile objects required to manage the thread it associates with. +3) pthread_t may carry additional information, e.g. for debugging or to manage +itself. +4) there is an implicit requirement that the size of pthread_t is determinable +at compile-time and size-invariant, because it must be able to copy the object +(i.e. through assignment and pass-by-value). Such copies must be genuine +duplicates, not merely a copy of a pointer to a common instance such as +would be the case if pthread_t were defined as an array. + + +Suppose we define the following function: + +/* This function shall return it's argument */ +pthread_t* pthread_normalize(pthread_t* thread); + +For scalar or aggregate pthread_t types this function would simply zero any bits +within the pthread_t that don't uniquely identify the thread, including padding, +such that client code can return consistent results from operations done on the +result. If the additional bits are a pointer to an associate structure then +this function would ensure that the memory used to store that associate +structure does not leak. With normalization the following compare would be +valid and repeatable: + +memcmp(pthread_normalize(&t1),pthread_normalize(&t2),sizeof(pthread_t)) + +Note 1: such comparisons are intended merely to order and sort pthread_t values +and allow them to index various data structures. They are not intended to reveal +anything about the relationships between threads, like startup order. + +Note 2: the normalized pthread_t is also a valid pthread_t that uniquely +identifies the same thread. + +Advantages: +1) In most existing implementations this function would reduce to a no-op that +emits no additional instructions, i.e after in-lining or optimisation, or if +defined as a macro: +#define pthread_normalise(tptr) (tptr) + +2) This single function allows an application to portably derive +application-level versions of any of the other required functions. + +3) It is a generic function that could enable unanticipated uses. + +Disadvantages: +1) Less efficient than dedicated compare or hash functions for implementations +that include significant extra non-id elements in pthread_t. + +2) Still need to be concerned about padding if copying normalized pthread_t. +See the later section on defining pthread_t to neutralise padding issues. + +Generally a pthread_t may need to be normalized every time it is used, +which could have a significant impact. However, this is a design decision +for the implementor in a competitive environment. An implementation is free +to define a pthread_t in a way that minimises or eliminates padding or +renders this function a no-op. + +Hazards: +1) Pass-by-reference directly modifies 'thread' so the application must +synchronise access or ensure that the pointer refers to a copy. The alternative +of pass-by-value/return-by-value was considered but then this requires two copy +operations, disadvantaging implementations where this function is not a no-op +in terms of speed of execution. This function is intended to be used in high +frequency situations and needs to be efficient, or at least not unnecessarily +inefficient. The alternative also sits awkwardly with functions like memcmp. + +2) [Non-compliant] code that uses relational and equality operators on +arithmetic or pointer style pthread_t types would need to be rewritten, but it +should be rewritten anyway. + + +C implementation of null/compare/hash functions using pthread_normalize(): + +/* In pthread.h */ +pthread_t* pthread_normalize(pthread_t* thread); + +/* In user code */ +/* User-level bitclear function - clear bits in loc corresponding to mask */ +void* bitclear (void* loc, void* mask, size_t count); + +typedef unsigned int hash_t; + +/* User-level hash function */ +hash_t hash(void* ptr, size_t count); + +/* + * User-level pthr_null function - modifies the origin thread handle. + * The concept of a null pthread_t is highly implementation dependent + * and this design may be far from the mark. For example, in an + * implementation "null" may mean setting a special value inside one + * element of pthread_t to mean "INVALID". However, if that value was zero and + * formed part of the id component then we may get away with this design. + */ +pthread_t* pthr_null(pthread_t* tp) +{ + /* + * This should have the same effect as memset(tp, 0, sizeof(pthread_t)) + * We're just showing that we can do it. + */ + void* p = (void*) pthread_normalize(tp); + return (pthread_t*) bitclear(p, p, sizeof(pthread_t)); +} + +/* + * Safe user-level pthr_compare function - modifies temporary thread handle copies + */ +int pthr_compare_safe(pthread_t thread1, pthread_t thread2) +{ + return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); +} + +/* + * Fast user-level pthr_compare function - modifies origin thread handles + */ +int pthr_compare_fast(pthread_t* thread1, pthread_t* thread2) +{ + return memcmp(pthread_normalize(&thread1), pthread_normalize(&thread2), sizeof(pthread_t)); +} + +/* + * Safe user-level pthr_hash function - modifies temporary thread handle copy + */ +hash_t pthr_hash_safe(pthread_t thread) +{ + return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); +} + +/* + * Fast user-level pthr_hash function - modifies origin thread handle + */ +hash_t pthr_hash_fast(pthread_t thread) +{ + return hash((void *) pthread_normalize(&thread), sizeof(pthread_t)); +} + +/* User-level bitclear function - modifies the origin array */ +void* bitclear(void* loc, void* mask, size_t count) +{ + int i; + for (i=0; i < count; i++) { + (unsigned char) *loc++ &= ~((unsigned char) *mask++); + } +} + +/* Donald Knuth hash */ +hash_t hash(void* str, size_t count) +{ + hash_t hash = (hash_t) count; + unsigned int i = 0; + + for(i = 0; i < len; str++, i++) + { + hash = ((hash << 5) ^ (hash >> 27)) ^ (*str); + } + return hash; +} + +/* Example of advantage point (3) - split a thread handle into its id and non-id values */ +pthread_t id = thread, non-id = thread; +bitclear((void*) &non-id, (void*) pthread_normalize(&id), sizeof(pthread_t)); + + +A pthread_t type change proposal to neutralise the effects of padding + +Even if pthread_normalize() is available, padding is still a problem because +the standard only garrantees element-by-element equivalence through +copy operations (assignment and pass-by-value). So padding bit values can +still change randomly after calls to pthread_normalize(). + +[I suspect that most compilers take the easy path and always byte-copy anyway, +partly because it becomes too complex to do (e.g. unions that contain sub-aggregates) +but also because programmers can easily design their aggregates to minimise and +often eliminate padding]. + +How can we eliminate the problem of padding bytes in structs? Could +defining pthread_t as a union rather than a struct provide a solution? + +In fact, the Linux pthread.h defines most of it's pthread_*_t objects (but not +pthread_t itself) as unions, possibly for this and/or other reasons. We'll +borrow some element naming from there but the ideas themselves are well known +- the __align element used to force alignment of the union comes from K&R's +storage allocator example. + +/* Essentially our current pthread_t renamed */ +typedef struct { + struct thread_state_t * __p; + long __x; /* sequence counter */ +} thread_id_t; + +Ensuring that the last element in the above struct is a long ensures that the +overall struct size is a multiple of sizeof(long), so there should be no trailing +padding in this struct or the union we define below. +(Later we'll see that we can handle internal but not trailing padding.) + +/* New pthread_t */ +typedef union { + char __size[sizeof(thread_id_t)]; /* array as the first element */ + thread_id_t __tid; + long __align; /* Ensure that the union starts on long boundary */ +} pthread_t; + +This guarrantees that, during an assignment or pass-by-value, the compiler copies +every byte in our thread_id_t because the compiler guarrantees that the __size +array, which we have ensured is the equal-largest element in the union, retains +equivalence. + +This means that pthread_t values stored, assigned and passed by value will at least +carry the value of any undefined padding bytes along and therefore ensure that +those values remain consistent. Our comparisons will return consistent results and +our hashes of [zero initialised] pthread_t values will also return consistent +results. + +We have also removed the need for a pthread_null() function; we can initialise +at declaration time or easily create our own const pthread_t to use in assignments +later: + +const pthread_t null_tid = {0}; /* braces are required */ + +pthread_t t; +... +t = null_tid; + + +Note that we don't have to explicitly make use of the __size array at all. It's +there just to force the compiler behaviour we want. + + +Partial solutions without a pthread_normalize function + + +An application-level pthread_null and pthread_compare proposal +(and pthread_hash proposal by extention) + +In order to deal with the problem of scalar/aggregate pthread_t type disparity in +portable code I suggest using an old-fashioned union, e.g.: + +Contraints: +- there is no padding, or padding values are preserved through assignment and + pass-by-value (see above); +- there are no extra non-id values in the pthread_t. + + +Example 1: A null initialiser for pthread_t variables... + +typedef union { + unsigned char b[sizeof(pthread_t)]; + pthread_t t; +} init_t; + +const init_t initial = {0}; + +pthread_t tid = initial.t; /* init tid to all zeroes */ + + +Example 2: A comparison function for pthread_t values + +typedef union { + unsigned char b[sizeof(pthread_t)]; + pthread_t t; +} pthcmp_t; + +int pthcmp(pthread_t left, pthread_t right) +{ + /* + * Compare two pthread handles in a way that imposes a repeatable but arbitrary + * ordering on them. + * I.e. given the same set of pthread_t handles the ordering should be the same + * each time but the order has no particular meaning other than that. E.g. + * the ordering does not imply the thread start sequence, or any other + * relationship between threads. + * + * Return values are: + * 1 : left is greater than right + * 0 : left is equal to right + * -1 : left is less than right + */ + int i; + pthcmp_t L, R; + L.t = left; + R.t = right; + for (i = 0; i < sizeof(pthread_t); i++) + { + if (L.b[i] > R.b[i]) + return 1; + else if (L.b[i] < R.b[i]) + return -1; + } + return 0; +} + +It has been pointed out that the C99 standard allows for the possibility that +integer types also may include padding bits, which could invalidate the above +method. This addition to C99 was specifically included after it was pointed +out that there was one, presumably not particularly well known, architecture +that included a padding bit in it's 32 bit integer type. See section 6.2.6.2 +of both the standard and the rationale, specifically the paragraph starting at +line 16 on page 43 of the rationale. + + +An aside + +Certain compilers, e.g. gcc and one of the IBM compilers, include a feature +extention: provided the union contains a member of the same type as the +object then the object may be cast to the union itself. + +We could use this feature to speed up the pthrcmp() function from example 2 +above by directly referencing rather than copying the pthread_t arguments to +the local union variables, e.g.: + +int pthcmp(pthread_t left, pthread_t right) +{ + /* + * Compare two pthread handles in a way that imposes a repeatable but arbitrary + * ordering on them. + * I.e. given the same set of pthread_t handles the ordering should be the same + * each time but the order has no particular meaning other than that. E.g. + * the ordering does not imply the thread start sequence, or any other + * relationship between threads. + * + * Return values are: + * 1 : left is greater than right + * 0 : left is equal to right + * -1 : left is less than right + */ + int i; + for (i = 0; i < sizeof(pthread_t); i++) + { + if (((pthcmp_t)left).b[i] > ((pthcmp_t)right).b[i]) + return 1; + else if (((pthcmp_t)left).b[i] < ((pthcmp_t)right).b[i]) + return -1; + } + return 0; +} + + +Result thus far + +We can't remove undefined bits if they are there in pthread_t already, but we have +attempted to render them inert for comparison and hashing functions by making them +consistent through assignment, copy and pass-by-value. + +Note: Hashing pthread_t values requires that all pthread_t variables be initialised +to the same value (usually all zeros) before being assigned a proper thread ID, i.e. +to ensure that any padding bits are zero, or at least the same value for all +pthread_t. Since all pthread_t values are generated by the library in the first +instance this need not be an application-level operation. + + +Conclusion + +I've attempted to resolve the multiple issues of type opacity and the possible +presence of undefined bits and bytes in pthread_t values, which prevent +applications from comparing or hashing pthread handles. + +Two complimentary partial solutions have been proposed, one an application-level +scheme to handle both scalar and aggregate pthread_t types equally, plus a +definition of pthread_t itself that neutralises padding bits and bytes by +coercing semantics out of the compiler to eliminate variations in the values of +padding bits. + +I have not provided any solution to the problem of handling extra values embedded +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 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. Most of the other desired operations on pthread_t +values (null, compare, hash, etc.) can be trivially derived from this and other +standard functions. diff --git a/_ptw32.h b/_ptw32.h index 62194f8e..90d9794e 100644 --- a/_ptw32.h +++ b/_ptw32.h @@ -2,40 +2,39 @@ * Module: _ptw32.h * * Purpose: - * Pthreads-win32 internal macros, to be shared by other headers - * comprising the pthreads-win32 package. + * Pthreads4w internal macros, to be shared by other headers + * comprising the pthreads4w package. * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2012, 2016, Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- */ + #ifndef __PTW32_H #define __PTW32_H diff --git a/aclocal.m4 b/aclocal.m4 index 8561e862..f615b29c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,30 +1,30 @@ ## aclocal.m4 ## -------------------------------------------------------------------------- ## -## Pthreads-win32 - POSIX Threads Library for Win32 -## Copyright(C) 1998 John E. Bossom -## Copyright(C) 1999-2012, 2016, Pthreads-win32 contributors -## -## The current list of contributors is contained -## in the file CONTRIBUTORS included with the source -## code distribution. The list can also be seen at the -## following World Wide Web location: -## http://sources.redhat.com/pthreads-win32/contributors.html -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library in the file COPYING.LIB; -## if not, write to the Free Software Foundation, Inc., -## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. ## # # PTW32_AC_CHECK_TYPEDEF( TYPENAME, [HEADER] ) diff --git a/cleanup.c b/cleanup.c index 21e59dff..9e746d9f 100644 --- a/cleanup.c +++ b/cleanup.c @@ -8,33 +8,32 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- */ #ifdef HAVE_CONFIG_H diff --git a/configure.ac b/configure.ac index 5490826b..a3146a59 100644 --- a/configure.ac +++ b/configure.ac @@ -1,30 +1,30 @@ # configure.ac # -------------------------------------------------------------------------- # -# Pthreads-win32 - POSIX Threads Library for Win32 -# Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999-2012, 2016, Pthreads-win32 contributors -# -# The current list of contributors is contained -# in the file CONTRIBUTORS included with the source -# code distribution. The list can also be seen at the -# following World Wide Web location: -# http://sources.redhat.com/pthreads-win32/contributors.html -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library in the file COPYING.LIB; -# if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. # AC_INIT([pthreads-win32],[git]) AC_CONFIG_HEADERS([config.h]) diff --git a/context.h b/context.h index c7bda8cc..d567e854 100644 --- a/context.h +++ b/context.h @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef __PTW32_CONTEXT_H diff --git a/create.c b/create.c index 1747f5b1..21e04ce3 100644 --- a/create.c +++ b/create.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/dll.c b/dll.c index 5d7b951c..3c9afd76 100644 --- a/dll.c +++ b/dll.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/errno.c b/errno.c index dbdf4d7e..a4858c64 100644 --- a/errno.c +++ b/errno.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/global.c b/global.c index 7a9e354e..d346ba42 100644 --- a/global.c +++ b/global.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/implement.h b/implement.h index fe8d2bb6..543c2044 100644 --- a/implement.h +++ b/implement.h @@ -7,32 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Contact Email: Ross.Johnson@homemail.com.au + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #if !defined(_IMPLEMENT_H) diff --git a/manual/ChangeLog b/manual/ChangeLog index 443e6c01..bcf8930e 100644 --- a/manual/ChangeLog +++ b/manual/ChangeLog @@ -1,3 +1,9 @@ +2016-12-25 Ross Johnson + + * Change all references to "pthreads-w32" etc. to "PThreads4W" + * Change all references to the sourceware projects web page to the + SourceForge project web page. + 2015-02-03 Ross Johnson * *.html: Fix HEAD section inconsistencies and remove editor meta tags. @@ -38,7 +44,7 @@ * PortabilityIssues.html: Was nonPortableIssues.html. * index.html: Updated; add table of contents at top. - * *.html: Add Pthreads-win32 header info; add link back to the + * *.html: Add PThreads4W header info; add link back to the index page 'index.html'. 2005-05-06 Ross Johnson diff --git a/manual/PortabilityIssues.html b/manual/PortabilityIssues.html index 9c1b0d07..0fce9e00 100644 --- a/manual/PortabilityIssues.html +++ b/manual/PortabilityIssues.html @@ -18,7 +18,7 @@

POSIX Threads for Windows – REFERENCE – -Pthreads-w32

+Pthreads4W

Reference Index

Table of Contents

Name

@@ -685,7 +685,7 @@

Thread priority

4, 5, and 6 are not supported.

As you can see, the real priority levels available to any individual Win32 thread are non-contiguous.

-

An application using Pthreads-w32 should +

An application using PThreads4W should not make assumptions about the numbers used to represent thread priority levels, except that they are monotonic between the values returned by sched_get_priority_min() and sched_get_priority_max(). @@ -693,7 +693,7 @@

Thread priority

range of numbers between -15 and 15, while at least one version of WinCE (3.0) defines the minimum priority (THREAD_PRIORITY_LOWEST) as 5, and the maximum priority (THREAD_PRIORITY_HIGHEST) as 1.

-

Internally, pthreads-win32 maps any +

Internally, PThreads4W maps any priority levels between THREAD_PRIORITY_IDLE and THREAD_PRIORITY_LOWEST to THREAD_PRIORITY_LOWEST, or between THREAD_PRIORITY_TIME_CRITICAL and THREAD_PRIORITY_HIGHEST to @@ -701,10 +701,10 @@

Thread priority

REALTIME_PRIORITY_CLASS even if levels -7, -6, -5, -4, -3, 3, 4, 5, and 6 are supported.

If it wishes, a Win32 application using -pthreads-w32 can use the Win32 defined priority macros +PThreads4W can use the Win32 defined priority macros THREAD_PRIORITY_IDLE through THREAD_PRIORITY_TIME_CRITICAL.

Author

-

Ross Johnson for use with Pthreads-w32.

+

Ross Johnson for use with Pthreads4W.

See also



diff --git a/manual/cpu_set.html b/manual/cpu_set.html index c2098325..15d36605 100644 --- a/manual/cpu_set.html +++ b/manual/cpu_set.html @@ -13,7 +13,7 @@

POSIX -Threads for Windows – REFERENCE - Pthreads-w32

+Threads for Windows – REFERENCE - Pthreads4W

Reference Index

Table of Contents

Name

diff --git a/manual/index.html b/manual/index.html index 5029da24..36828a56 100644 --- a/manual/index.html +++ b/manual/index.html @@ -20,12 +20,12 @@

POSIX Threads for Windows – REFERENCE - -Pthreads-w32

+Pthreads4W

Table of Contents

POSIX threads API reference
Miscellaneous POSIX -thread safe routines provided by Pthreads-w32
Non-portable -Pthreads-w32 routines
Other

+thread safe routines provided by PThreads4W
Non-portable +PThreads4W routines
Other

POSIX threads API reference

cpu_set

@@ -148,7 +148,7 @@

POSIX threads API

sem_wait

sigwait

Non-portable -Pthreads-w32 routines

+PThreads4W routines

pthreadCancelableTimedWait

pthreadCancelableWait

pthread_attr_getaffinity_np

diff --git a/manual/pthreadCancelableWait.html b/manual/pthreadCancelableWait.html index 61a1f6a5..bd3108b4 100644 --- a/manual/pthreadCancelableWait.html +++ b/manual/pthreadCancelableWait.html @@ -18,7 +18,7 @@

POSIX Threads for Windows – REFERENCE – -Pthreads-w32

+Pthreads4W

Reference Index

Table of Contents

Name

@@ -64,7 +64,7 @@

Errors

The interval timeout milliseconds elapsed before waitHandle was signalled.

Author

-

Ross Johnson for use with Pthreads-w32.

+

Ross Johnson for use with Pthreads4W.

See also

pthread_cancel(), pthread_self()

diff --git a/manual/pthread_attr_init.html b/manual/pthread_attr_init.html index 099a53bc..79b2b0ba 100644 --- a/manual/pthread_attr_init.html +++ b/manual/pthread_attr_init.html @@ -1,330 +1,330 @@ - - - - - PTHREAD_ATTR_INIT(3) manual page - - - - - - - -

POSIX Threads for Windows – REFERENCE – -Pthreads-w32

-

Reference Index

-

Table of Contents

-

Name

-

pthread_attr_init, pthread_attr_destroy, -pthread_attr_setaffinity_np, pthread_attr_setdetachstate, -pthread_attr_getaffinity_np, pthread_attr_getdetachstate, -pthread_attr_setschedparam, pthread_attr_getschedparam, -pthread_attr_setschedpolicy, pthread_attr_getschedpolicy, -pthread_attr_setinheritsched, pthread_attr_getinheritsched, -pthread_attr_setscope, pthread_attr_getscope - thread creation -attributes -

-

Synopsis

-

#include <pthread.h> -

-

int pthread_attr_init(pthread_attr_t *attr); -

-

int pthread_attr_destroy(pthread_attr_t *attr); -

-

int pthread_attr_setaffinity_np(pthread_attr_t *attr, -size_t cpusetsize, -cpu_set_t * -cpuset); -

-

int pthread_attr_getaffinity_np(const pthread_attr_t *attr, -size_t cpusetsize, -cpu_set_t * -cpuset); -

-

int pthread_attr_setdetachstate(pthread_attr_t *attr, -int detachstate); -

-

int pthread_attr_getdetachstate(const pthread_attr_t *attr, -int *detachstate); -

-

int pthread_attr_setname_np(const pthread_attr_t *attr, -const char * name, -void * arg);

-

int pthread_attr_getname_np(const pthread_attr_t *attr, -char * name, -int len);

-

int pthread_attr_setschedpolicy(pthread_attr_t *attr, -int policy); -

-

int pthread_attr_getschedpolicy(const pthread_attr_t *attr, -int *policy); -

-

int pthread_attr_setschedparam(pthread_attr_t *attr, -const struct sched_param *param); -

-

int pthread_attr_getschedparam(const pthread_attr_t *attr, -struct sched_param *param); -

-

int pthread_attr_setinheritsched(pthread_attr_t *attr, -int inherit); -

-

int pthread_attr_getinheritsched(const pthread_attr_t *attr, -int *inherit); -

-

int pthread_attr_setscope(pthread_attr_t *attr, -int scope); -

-

int pthread_attr_getscope(const pthread_attr_t *attr, -int *scope); -

-

Description

-

Setting attributes for threads is achieved by filling a thread -attribute object attr of type pthread_attr_t, then -passing it as second argument to pthread_create(3) -. Passing NULL is equivalent to passing a thread attribute -object with all attributes set to their default values. -

-

pthread_attr_init initializes the thread attribute object -attr and fills it with default values for the attributes. (The -default values are listed below for each attribute.) -

-

Each attribute attrname (see below for a list of all -attributes) can be individually set using the function -pthread_attr_setattrname and retrieved using the -function pthread_attr_getattrname. -

-

pthread_attr_destroy destroys a thread attribute object, -which must not then be reused until it is reinitialized. -

-

Attribute objects are consulted only when creating a new thread. -The same attribute object can be used for creating several threads. -Modifying an attribute object after a call to pthread_create -does not change the attributes of the thread previously created. -

-

The following thread attributes are supported: -

-

affinity

-

Controls which CPUs the thread is eligible to run on. If not set -then the thread will inherit the cpuset from it's parent -[creator thread]. See also: pthread_setaffinity_np(3), -pthread_getaffinity_np(3), -sched_setaffinity(3), -sched_getaffinity(3), cpu_set(3)

-

detachstate

-

Control whether the thread is created in the joinable state (value -PTHREAD_CREATE_JOINABLE) or in the detached state ( -PTHREAD_CREATE_DETACHED). -

-

Default value: PTHREAD_CREATE_JOINABLE. -

-

In the joinable state, another thread can synchronize on the -thread termination and recover its termination code using -pthread_join(3) . When a -joinable thread terminates, some of the thread resources are kept -allocated, and released only when another thread performs -pthread_join(3) on that -thread. -

-

In the detached state, the thread's resources are released -immediately when it terminates. pthread_join(3) -cannot be used to synchronize on the thread termination. -

-

A thread created in the joinable state can later be put in the -detached thread using pthread_detach(3) -. -

-

name

-

Give threads names to aid in tracing during debugging Threads do -not have a default name. See also: pthread_setname_np(3), -pthread_getname_np(3).

-

schedpolicy

-

Select the scheduling policy for the thread: one of SCHED_OTHER -(regular, non-real-time scheduling), SCHED_RR (real-time, -round-robin) or SCHED_FIFO (real-time, first-in first-out). -

-

Pthreads-w32 only supports SCHED_OTHER - attempting -to set one of the other policies will return an error ENOTSUP.

-

Default value: SCHED_OTHER. -

-

Pthreads-w32 only supports SCHED_OTHER - attempting -to set one of the other policies will return an error ENOTSUP.

-

The scheduling policy of a thread can be changed after creation -with pthread_setschedparam(3) -. -

-

schedparam

-

Contain the scheduling parameters (essentially, the scheduling -priority) for the thread.

-

Pthreads-w32 supports the priority levels defined by the -Windows system it is running on. Under Windows, thread priorities are -relative to the process priority class, which must be set via the -Windows W32 API.

-

Default value: priority is 0 (Win32 level THREAD_PRIORITY_NORMAL). -

-

The scheduling priority of a thread can be changed after creation -with pthread_setschedparam(3) -. -

-

inheritsched

-

Indicate whether the scheduling policy and scheduling parameters -for the newly created thread are determined by the values of the -schedpolicy and schedparam attributes (value -PTHREAD_EXPLICIT_SCHED) or are inherited from the parent -thread (value PTHREAD_INHERIT_SCHED). -

-

Default value: PTHREAD_EXPLICIT_SCHED. -

-

scope

-

Define the scheduling contention scope for the created thread. The -only value supported in the Pthreads-w32 implementation is -PTHREAD_SCOPE_SYSTEM, meaning that the threads contend for CPU -time with all processes running on the machine. The other value -specified by the standard, PTHREAD_SCOPE_PROCESS, means that -scheduling contention occurs only between the threads of the running -process.

-

Pthreads-w32 only supports PTHREAD_SCOPE_SYSTEM.

-

Default value: PTHREAD_SCOPE_SYSTEM. -

-

Return Value

-

All functions return 0 on success and a non-zero error code on -error. On success, the pthread_attr_getattrname -functions also store the current value of the attribute attrname -in the location pointed to by their second argument. -

-

Errors

-

The pthread_attr_setaffinity function returns the following -error codes on error: -

-
-
EINVAL
- one or both of the specified attribute or cpuset - argument is invalid.
-
-

-The pthread_attr_setdetachstate function returns the following -error codes on error: -

-
-
EINVAL -
- the specified detachstate is not one of - PTHREAD_CREATE_JOINABLE or PTHREAD_CREATE_DETACHED. -
-
-

-The pthread_attr_setschedparam function returns the following -error codes on error: -

-
-
EINVAL -
- the priority specified in param is outside the range of - allowed priorities for the scheduling policy currently in attr - (1 to 99 for SCHED_FIFO and SCHED_RR; 0 for - SCHED_OTHER). -
-
-

-The pthread_attr_setschedpolicy function returns the following -error codes on error: -

-
-
EINVAL -
- the specified policy is not one of SCHED_OTHER, - SCHED_FIFO, or SCHED_RR. -
- ENOTSUP -
- policy is not SCHED_OTHER, the only value supported - by Pthreads-w32.
-
-

-The pthread_attr_setinheritsched function returns the -following error codes on error: -

-
-
EINVAL -
- the specified inherit is not one of PTHREAD_INHERIT_SCHED - or PTHREAD_EXPLICIT_SCHED. -
-
-

-The pthread_attr_setscope function returns the following error -codes on error: -

-
-
EINVAL -
- the specified scope is not one of PTHREAD_SCOPE_SYSTEM - or PTHREAD_SCOPE_PROCESS. -
- ENOTSUP -
- the specified scope is PTHREAD_SCOPE_PROCESS (not - supported by Pthreads-w32). -
-
-

-Author

-

Xavier Leroy <Xavier.Leroy@inria.fr> -

-

Modified by Ross Johnson for use with Pthreads-w32.

-

See Also

-

pthread_create(3) , -pthread_join(3) , -pthread_detach(3) , -pthread_setname_np(3), -pthread_getname_np(3), -pthread_setschedparam(3) -, pthread_setaffinity_np(3) -, pthread_getaffinity_np(3) -, sched_setaffinity(3) , -sched_getaffinity(3) , -cpu_set(3) . -

-
-

Table of Contents

- - + + + + + PTHREAD_ATTR_INIT(3) manual page + + + + + + + +

POSIX Threads for Windows – REFERENCE – +Pthreads4W

+

Reference Index

+

Table of Contents

+

Name

+

pthread_attr_init, pthread_attr_destroy, +pthread_attr_setaffinity_np, pthread_attr_setdetachstate, +pthread_attr_getaffinity_np, pthread_attr_getdetachstate, +pthread_attr_setschedparam, pthread_attr_getschedparam, +pthread_attr_setschedpolicy, pthread_attr_getschedpolicy, +pthread_attr_setinheritsched, pthread_attr_getinheritsched, +pthread_attr_setscope, pthread_attr_getscope - thread creation +attributes +

+

Synopsis

+

#include <pthread.h> +

+

int pthread_attr_init(pthread_attr_t *attr); +

+

int pthread_attr_destroy(pthread_attr_t *attr); +

+

int pthread_attr_setaffinity_np(pthread_attr_t *attr, +size_t cpusetsize, +cpu_set_t * +cpuset); +

+

int pthread_attr_getaffinity_np(const pthread_attr_t *attr, +size_t cpusetsize, +cpu_set_t * +cpuset); +

+

int pthread_attr_setdetachstate(pthread_attr_t *attr, +int detachstate); +

+

int pthread_attr_getdetachstate(const pthread_attr_t *attr, +int *detachstate); +

+

int pthread_attr_setname_np(const pthread_attr_t *attr, +const char * name, +void * arg);

+

int pthread_attr_getname_np(const pthread_attr_t *attr, +char * name, +int len);

+

int pthread_attr_setschedpolicy(pthread_attr_t *attr, +int policy); +

+

int pthread_attr_getschedpolicy(const pthread_attr_t *attr, +int *policy); +

+

int pthread_attr_setschedparam(pthread_attr_t *attr, +const struct sched_param *param); +

+

int pthread_attr_getschedparam(const pthread_attr_t *attr, +struct sched_param *param); +

+

int pthread_attr_setinheritsched(pthread_attr_t *attr, +int inherit); +

+

int pthread_attr_getinheritsched(const pthread_attr_t *attr, +int *inherit); +

+

int pthread_attr_setscope(pthread_attr_t *attr, +int scope); +

+

int pthread_attr_getscope(const pthread_attr_t *attr, +int *scope); +

+

Description

+

Setting attributes for threads is achieved by filling a thread +attribute object attr of type pthread_attr_t, then +passing it as second argument to pthread_create(3) +. Passing NULL is equivalent to passing a thread attribute +object with all attributes set to their default values. +

+

pthread_attr_init initializes the thread attribute object +attr and fills it with default values for the attributes. (The +default values are listed below for each attribute.) +

+

Each attribute attrname (see below for a list of all +attributes) can be individually set using the function +pthread_attr_setattrname and retrieved using the +function pthread_attr_getattrname. +

+

pthread_attr_destroy destroys a thread attribute object, +which must not then be reused until it is reinitialized. +

+

Attribute objects are consulted only when creating a new thread. +The same attribute object can be used for creating several threads. +Modifying an attribute object after a call to pthread_create +does not change the attributes of the thread previously created. +

+

The following thread attributes are supported: +

+

affinity

+

Controls which CPUs the thread is eligible to run on. If not set +then the thread will inherit the cpuset from it's parent +[creator thread]. See also: pthread_setaffinity_np(3), +pthread_getaffinity_np(3), +sched_setaffinity(3), +sched_getaffinity(3), cpu_set(3)

+

detachstate

+

Control whether the thread is created in the joinable state (value +PTHREAD_CREATE_JOINABLE) or in the detached state ( +PTHREAD_CREATE_DETACHED). +

+

Default value: PTHREAD_CREATE_JOINABLE. +

+

In the joinable state, another thread can synchronize on the +thread termination and recover its termination code using +pthread_join(3) . When a +joinable thread terminates, some of the thread resources are kept +allocated, and released only when another thread performs +pthread_join(3) on that +thread. +

+

In the detached state, the thread's resources are released +immediately when it terminates. pthread_join(3) +cannot be used to synchronize on the thread termination. +

+

A thread created in the joinable state can later be put in the +detached thread using pthread_detach(3) +. +

+

name

+

Give threads names to aid in tracing during debugging Threads do +not have a default name. See also: pthread_setname_np(3), +pthread_getname_np(3).

+

schedpolicy

+

Select the scheduling policy for the thread: one of SCHED_OTHER +(regular, non-real-time scheduling), SCHED_RR (real-time, +round-robin) or SCHED_FIFO (real-time, first-in first-out). +

+

PThreads4W only supports SCHED_OTHER - attempting +to set one of the other policies will return an error ENOTSUP.

+

Default value: SCHED_OTHER. +

+

PThreads4W only supports SCHED_OTHER - attempting +to set one of the other policies will return an error ENOTSUP.

+

The scheduling policy of a thread can be changed after creation +with pthread_setschedparam(3) +. +

+

schedparam

+

Contain the scheduling parameters (essentially, the scheduling +priority) for the thread.

+

PThreads4W supports the priority levels defined by the +Windows system it is running on. Under Windows, thread priorities are +relative to the process priority class, which must be set via the +Windows W32 API.

+

Default value: priority is 0 (Win32 level THREAD_PRIORITY_NORMAL). +

+

The scheduling priority of a thread can be changed after creation +with pthread_setschedparam(3) +. +

+

inheritsched

+

Indicate whether the scheduling policy and scheduling parameters +for the newly created thread are determined by the values of the +schedpolicy and schedparam attributes (value +PTHREAD_EXPLICIT_SCHED) or are inherited from the parent +thread (value PTHREAD_INHERIT_SCHED). +

+

Default value: PTHREAD_EXPLICIT_SCHED. +

+

scope

+

Define the scheduling contention scope for the created thread. The +only value supported in the PThreads4W implementation is +PTHREAD_SCOPE_SYSTEM, meaning that the threads contend for CPU +time with all processes running on the machine. The other value +specified by the standard, PTHREAD_SCOPE_PROCESS, means that +scheduling contention occurs only between the threads of the running +process.

+

PThreads4W only supports PTHREAD_SCOPE_SYSTEM.

+

Default value: PTHREAD_SCOPE_SYSTEM. +

+

Return Value

+

All functions return 0 on success and a non-zero error code on +error. On success, the pthread_attr_getattrname +functions also store the current value of the attribute attrname +in the location pointed to by their second argument. +

+

Errors

+

The pthread_attr_setaffinity function returns the following +error codes on error: +

+
+
EINVAL
+ one or both of the specified attribute or cpuset + argument is invalid.
+
+

+The pthread_attr_setdetachstate function returns the following +error codes on error: +

+
+
EINVAL +
+ the specified detachstate is not one of + PTHREAD_CREATE_JOINABLE or PTHREAD_CREATE_DETACHED. +
+
+

+The pthread_attr_setschedparam function returns the following +error codes on error: +

+
+
EINVAL +
+ the priority specified in param is outside the range of + allowed priorities for the scheduling policy currently in attr + (1 to 99 for SCHED_FIFO and SCHED_RR; 0 for + SCHED_OTHER). +
+
+

+The pthread_attr_setschedpolicy function returns the following +error codes on error: +

+
+
EINVAL +
+ the specified policy is not one of SCHED_OTHER, + SCHED_FIFO, or SCHED_RR. +
+ ENOTSUP +
+ policy is not SCHED_OTHER, the only value supported + by PThreads4W.
+
+

+The pthread_attr_setinheritsched function returns the +following error codes on error: +

+
+
EINVAL +
+ the specified inherit is not one of PTHREAD_INHERIT_SCHED + or PTHREAD_EXPLICIT_SCHED. +
+
+

+The pthread_attr_setscope function returns the following error +codes on error: +

+
+
EINVAL +
+ the specified scope is not one of PTHREAD_SCOPE_SYSTEM + or PTHREAD_SCOPE_PROCESS. +
+ ENOTSUP +
+ the specified scope is PTHREAD_SCOPE_PROCESS (not + supported by PThreads4W). +
+
+

+Author

+

Xavier Leroy <Xavier.Leroy@inria.fr> +

+

Modified by Ross Johnson for use with Pthreads4W.

+

See Also

+

pthread_create(3) , +pthread_join(3) , +pthread_detach(3) , +pthread_setname_np(3), +pthread_getname_np(3), +pthread_setschedparam(3) +, pthread_setaffinity_np(3) +, pthread_getaffinity_np(3) +, sched_setaffinity(3) , +sched_getaffinity(3) , +cpu_set(3) . +

+
+

Table of Contents

+ + \ No newline at end of file diff --git a/manual/pthread_attr_setstackaddr.html b/manual/pthread_attr_setstackaddr.html index 2e3497ea..44c9ea12 100644 --- a/manual/pthread_attr_setstackaddr.html +++ b/manual/pthread_attr_setstackaddr.html @@ -1,164 +1,164 @@ - - - - - PTHREAD_ATTR_SETSTACKADDR(3) manual page - - - - - - - -

POSIX Threads for Windows – REFERENCE – -Pthreads-w32

-

Reference Index

-

Table of Contents

-

Name

-

pthread_attr_getstackaddr, pthread_attr_setstackaddr - get and set -the stackaddr attribute -

-

Synopsis

-

#include <pthread.h> -

-

int pthread_attr_getstackaddr(const pthread_attr_t *restrict -attr, void **restrict stackaddr);
int -pthread_attr_setstackaddr(pthread_attr_t *
attr, void -*stackaddr); -

-

Description

-

The pthread_attr_getstackaddr and pthread_attr_setstackaddr -functions, respectively, shall get and set the thread creation -stackaddr attribute in the attr object. -

-

The stackaddr attribute specifies the location of storage -to be used for the created thread’s stack. The size of the -storage shall be at least {PTHREAD_STACK_MIN}. -

-

Pthreads-w32 defines _POSIX_THREAD_ATTR_STACKADDR in -pthread.h as -1 to indicate that these routines are implemented but -cannot used to set or get the stack address. These routines always -return the error ENOSYS when called.

-

Return Value

-

Upon successful completion, pthread_attr_getstackaddr and -pthread_attr_setstackaddr shall return a value of 0; -otherwise, an error number shall be returned to indicate the error. -

-

The pthread_attr_getstackaddr function stores the stackaddr -attribute value in stackaddr if successful. -

-

Errors

-

The pthread_attr_setstackaddr function always returns the -following error code: -

-
-
ENOSYS
- The function is not supported. -
-
-

-The pthread_attr_getstackaddr function always returns the -following error code: -

-
-
ENOSYS
- The function is not supported. -
-
-

-These functions shall not return an error code of [EINTR]. -

-

The following sections are informative. -

-

Examples

-

None. -

-

Application Usage

-

The specification of the stackaddr attribute presents -several ambiguities that make portable use of these interfaces -impossible. The description of the single address parameter as a -"stack" does not specify a particular relationship between -the address and the "stack" implied by that address. For -example, the address may be taken as the low memory address of a -buffer intended for use as a stack, or it may be taken as the address -to be used as the initial stack pointer register value for the new -thread. These two are not the same except for a machine on which the -stack grows "up" from low memory to high, and on which a -"push" operation first stores the value in memory and then -increments the stack pointer register. Further, on a machine where -the stack grows "down" from high memory to low, -interpretation of the address as the "low memory" address -requires a determination of the intended size of the stack. -IEEE Std 1003.1-2001 has introduced the new interfaces -pthread_attr_setstack(3) -and pthread_attr_getstack(3) -to resolve these ambiguities. -

-

Rationale

-

None. -

-

Future Directions

-

None. -

-

See Also

-

pthread_attr_destroy(3) -, pthread_attr_getdetachstate(3) -, pthread_attr_getstack(3) -, pthread_attr_getstacksize(3) -, pthread_attr_setstack(3) -, pthread_create(3) , the -Base Definitions volume of IEEE Std 1003.1-2001, -<limits.h>, <pthread.h> -

-

Copyright

-

Portions of this text are reprinted and reproduced in electronic -form from IEEE Std 1003.1, 2003 Edition, Standard for Information -Technology -- Portable Operating System Interface (POSIX), The Open -Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the -Institute of Electrical and Electronics Engineers, Inc and The Open -Group. In the event of any discrepancy between this version and the -original IEEE and The Open Group Standard, the original IEEE and The -Open Group Standard is the referee document. The original Standard -can be obtained online at http://www.opengroup.org/unix/online.html -. -

-

Modified by Ross Johnson for use with Pthreads-w32.

-
-

Table of Contents

- - + + + + + PTHREAD_ATTR_SETSTACKADDR(3) manual page + + + + + + + +

POSIX Threads for Windows – REFERENCE – +PThreads4W

+

Reference Index

+

Table of Contents

+

Name

+

pthread_attr_getstackaddr, pthread_attr_setstackaddr - get and set +the stackaddr attribute +

+

Synopsis

+

#include <pthread.h> +

+

int pthread_attr_getstackaddr(const pthread_attr_t *restrict +attr, void **restrict stackaddr);
int +pthread_attr_setstackaddr(pthread_attr_t *
attr, void +*stackaddr); +

+

Description

+

The pthread_attr_getstackaddr and pthread_attr_setstackaddr +functions, respectively, shall get and set the thread creation +stackaddr attribute in the attr object. +

+

The stackaddr attribute specifies the location of storage +to be used for the created thread’s stack. The size of the +storage shall be at least {PTHREAD_STACK_MIN}. +

+

PThreads4W defines _POSIX_THREAD_ATTR_STACKADDR in +pthread.h as -1 to indicate that these routines are implemented but +cannot used to set or get the stack address. These routines always +return the error ENOSYS when called.

+

Return Value

+

Upon successful completion, pthread_attr_getstackaddr and +pthread_attr_setstackaddr shall return a value of 0; +otherwise, an error number shall be returned to indicate the error. +

+

The pthread_attr_getstackaddr function stores the stackaddr +attribute value in stackaddr if successful. +

+

Errors

+

The pthread_attr_setstackaddr function always returns the +following error code: +

+
+
ENOSYS
+ The function is not supported. +
+
+

+The pthread_attr_getstackaddr function always returns the +following error code: +

+
+
ENOSYS
+ The function is not supported. +
+
+

+These functions shall not return an error code of [EINTR]. +

+

The following sections are informative. +

+

Examples

+

None. +

+

Application Usage

+

The specification of the stackaddr attribute presents +several ambiguities that make portable use of these interfaces +impossible. The description of the single address parameter as a +"stack" does not specify a particular relationship between +the address and the "stack" implied by that address. For +example, the address may be taken as the low memory address of a +buffer intended for use as a stack, or it may be taken as the address +to be used as the initial stack pointer register value for the new +thread. These two are not the same except for a machine on which the +stack grows "up" from low memory to high, and on which a +"push" operation first stores the value in memory and then +increments the stack pointer register. Further, on a machine where +the stack grows "down" from high memory to low, +interpretation of the address as the "low memory" address +requires a determination of the intended size of the stack. +IEEE Std 1003.1-2001 has introduced the new interfaces +pthread_attr_setstack(3) +and pthread_attr_getstack(3) +to resolve these ambiguities. +

+

Rationale

+

None. +

+

Future Directions

+

None. +

+

See Also

+

pthread_attr_destroy(3) +, pthread_attr_getdetachstate(3) +, pthread_attr_getstack(3) +, pthread_attr_getstacksize(3) +, pthread_attr_setstack(3) +, pthread_create(3) , the +Base Definitions volume of IEEE Std 1003.1-2001, +<limits.h>, <pthread.h> +

+

Copyright

+

Portions of this text are reprinted and reproduced in electronic +form from IEEE Std 1003.1, 2003 Edition, Standard for Information +Technology -- Portable Operating System Interface (POSIX), The Open +Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the +Institute of Electrical and Electronics Engineers, Inc and The Open +Group. In the event of any discrepancy between this version and the +original IEEE and The Open Group Standard, the original IEEE and The +Open Group Standard is the referee document. The original Standard +can be obtained online at http://www.opengroup.org/unix/online.html +. +

+

Modified by Ross Johnson for use with PThreads4W.

+
+

Table of Contents

+ + \ No newline at end of file diff --git a/manual/pthread_attr_setstacksize.html b/manual/pthread_attr_setstacksize.html index f8f52faf..ebce8399 100644 --- a/manual/pthread_attr_setstacksize.html +++ b/manual/pthread_attr_setstacksize.html @@ -5,7 +5,7 @@ PTHREAD_ATTR_SETSTACKSIZE(3) manual page -

POSIX Threads for Windows – REFERENCE - Pthreads-w32

+

POSIX Threads for Windows – REFERENCE - Pthreads4W

Reference Index

Table of Contents

Name

@@ -28,10 +28,10 @@

Description

The stacksize attribute shall define the minimum stack size (in bytes) allocated for the created threads stack.

-

Pthreads-w32 defines _POSIX_THREAD_ATTR_STACKSIZE in +

PThreads4W defines _POSIX_THREAD_ATTR_STACKSIZE in pthread.h to indicate that these routines are implemented and may be used to set or get the stack size.

-

Default value: 0 (in Pthreads-w32 a value of 0 means the stack +

Default value: 0 (in PThreads4W a value of 0 means the stack will grow as required)

Return Value

Upon successful completion, pthread_attr_getstacksize and @@ -87,7 +87,7 @@

Copyright

can be obtained online at http://www.opengroup.org/unix/online.html .

-

Modified by Ross Johnson for use with Pthreads-w32.

+

Modified by Ross Johnson for use with Pthreads4W.


Table of Contents

    diff --git a/manual/pthread_barrier_init.html b/manual/pthread_barrier_init.html index 18d06fb6..82116a27 100644 --- a/manual/pthread_barrier_init.html +++ b/manual/pthread_barrier_init.html @@ -5,7 +5,7 @@ PTHREAD_BARRIER_INIT(3) manual page -

    POSIX Threads for Windows – REFERENCE - Pthreads-w32

    +

    POSIX Threads for Windows – REFERENCE - Pthreads4W

    Reference Index

    Table of Contents

    Name

    @@ -120,7 +120,7 @@

    Application Usage

    functions are part of the Barriers option and need not be provided on all implementations.

    -

    Pthreads-w32 defines _POSIX_BARRIERS to indicate +

    PThreads4W defines _POSIX_BARRIERS to indicate that these routines are implemented and may be used.

    Rationale

    None. @@ -131,7 +131,7 @@

    Future Directions

    Known Bugs

    In - pthreads-win32, + PThreads4W, the behaviour of threads which enter pthread_barrier_wait(3) while the barrier is being destroyed is undefined.
    @@ -153,7 +153,7 @@

    Copyright

    can be obtained online at http://www.opengroup.org/unix/online.html .

    -

    Modified by Ross Johnson for use with Pthreads-w32.

    +

    Modified by Ross Johnson for use with Pthreads4W.


    Table of Contents

      diff --git a/manual/pthread_barrier_wait.html b/manual/pthread_barrier_wait.html index 33295927..82c82432 100644 --- a/manual/pthread_barrier_wait.html +++ b/manual/pthread_barrier_wait.html @@ -5,7 +5,7 @@ PTHREAD_BARRIER_WAIT(3) manual page -

      POSIX Threads for Windows – REFERENCE - Pthreads-w32

      +

      POSIX Threads for Windows – REFERENCE - Pthreads4W

      Reference Index

      Table of Contents

      Name

      @@ -87,7 +87,7 @@

      Application Usage

      The pthread_barrier_wait function is part of the Barriers option and need not be provided on all implementations.

      -

      Pthreads-w32 defines _POSIX_BARRIERS to indicate +

      PThreads4W defines _POSIX_BARRIERS to indicate that this routine is implemented and may be used.

      Rationale

      None. @@ -117,7 +117,7 @@

      Copyright

      can be obtained online at http://www.opengroup.org/unix/online.html .

      -

      Modified by Ross Johnson for use with Pthreads-w32.

      +

      Modified by Ross Johnson for use with Pthreads4W.


      Table of Contents

        diff --git a/manual/pthread_barrierattr_init.html b/manual/pthread_barrierattr_init.html index fa0ded40..b26c402a 100644 --- a/manual/pthread_barrierattr_init.html +++ b/manual/pthread_barrierattr_init.html @@ -5,7 +5,7 @@ PTHREAD_BARRIERATTR_INIT(3) manual page -

        POSIX Threads for Windows – REFERENCE - Pthreads-w32

        +

        POSIX Threads for Windows – REFERENCE - Pthreads4W

        Reference Index

        Table of Contents

        Name

        @@ -76,7 +76,7 @@

        Application Usage

        pthread_barrierattr_init functions are part of the Barriers option and need not be provided on all implementations.

        -

        Pthreads-w32 defines _POSIX_BARRIERS to indicate +

        PThreads4W defines _POSIX_BARRIERS to indicate that these routines are implemented and may be used.

        Rationale

        None. @@ -102,7 +102,7 @@

        Copyright

        can be obtained online at http://www.opengroup.org/unix/online.html .

        -

        Modified by Ross Johnson for use with Pthreads-w32.

        +

        Modified by Ross Johnson for use with Pthreads4W.


        Table of Contents

          diff --git a/manual/pthread_barrierattr_setpshared.html b/manual/pthread_barrierattr_setpshared.html index be8d27a7..afeab8e8 100644 --- a/manual/pthread_barrierattr_setpshared.html +++ b/manual/pthread_barrierattr_setpshared.html @@ -5,7 +5,7 @@ PTHREAD_BARRIERATTR_SETPSHARED(3) manual page -

          POSIX Threads for Windows – REFERENCE - Pthreads-w32

          +

          POSIX Threads for Windows – REFERENCE - Pthreads4W

          Reference Index

          Table of Contents

          Name

          @@ -39,7 +39,7 @@

          Description

          PTHREAD_PROCESS_PRIVATE. Both constants PTHREAD_PROCESS_SHARED and PTHREAD_PROCESS_PRIVATE are defined in <pthread.h>.

          -

          Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

          PThreads4W defines _POSIX_THREAD_PROCESS_SHARED in pthread.h as -1 to indicate that these routines are implemented but that the process shared attribute is not supported.

          Additional attributes, their default values, and the names of the @@ -76,7 +76,7 @@

          Errors

          ENOSYS
          The value specified by attr was PTHREAD_PROCESS_SHARED - (Pthreads-w32).
          + (PThreads4W).

          These functions shall not return an error code of [EINTR].

          @@ -90,7 +90,7 @@

          Application Usage

          pthread_barrierattr_setpshared functions are part of the Barriers option and need not be provided on all implementations.

          -

          Pthreads-w32 defines _POSIX_BARRIERS and +

          PThreads4W defines _POSIX_BARRIERS and _POSIX_THREAD_PROCESS_SHARED in pthread.h as -1 to indicate that these routines are implemented and may be used, but do not support the process shared option.

          @@ -119,7 +119,7 @@

          Copyright

          can be obtained online at http://www.opengroup.org/unix/online.html .

          -

          Modified by Ross Johnson for use with Pthreads-w32.

          +

          Modified by Ross Johnson for use with Pthreads4W.


          Table of Contents

            diff --git a/manual/pthread_cancel.html b/manual/pthread_cancel.html index 44074486..b6ce0a0a 100644 --- a/manual/pthread_cancel.html +++ b/manual/pthread_cancel.html @@ -5,7 +5,7 @@ PTHREAD_CANCEL(3) manual page -

            POSIX Threads for Windows – REFERENCE - Pthreads-w32

            +

            POSIX Threads for Windows – REFERENCE - Pthreads4W

            Reference Index

            Table of Contents

            Name

            @@ -64,14 +64,14 @@

            Description

            location pointed to by oldtype, and can thus be restored later by another call to pthread_setcanceltype.

            -

            Pthreads-w32 provides two levels of support for +

            PThreads4W provides two levels of support for PTHREAD_CANCEL_ASYNCHRONOUS: full and partial. Full support requires an additional DLL and driver be installed on the Windows system (see the See Also section below) that allows blocked threads to be cancelled immediately. Partial support means that the target thread will not cancel until it resumes execution naturally. Partial support is provided if either the DLL or the driver are not -automatically detected by the pthreads-w32 library at run-time.

            +automatically detected by the PThreads4W library at run-time.

            Threads are always created by pthread_create(3) with cancellation enabled and deferred. That is, the initial cancellation state is PTHREAD_CANCEL_ENABLE and the initial @@ -87,7 +87,7 @@

            Description


            pthread_cond_timedwait(3)
            pthread_testcancel(3)
            sem_wait(3)
            sem_timedwait(3)
            sigwait(3)

            -

            Pthreads-w32 provides two functions to enable additional +

            PThreads4W provides two functions to enable additional cancellation points to be created in user functions that block on Win32 HANDLEs:

            pthreadCancelableWait() @@ -144,12 +144,12 @@

            Errors

            Author

            Xavier Leroy <Xavier.Leroy@inria.fr>

            -

            Modified by Ross Johnson for use with Pthreads-w32.

            +

            Modified by Ross Johnson for use with Pthreads4W.

            See Also

            pthread_exit(3) , pthread_cleanup_push(3) , pthread_cleanup_pop(3) -, Pthreads-w32 package README file 'Prerequisites' section. +, PThreads4W package README file 'Prerequisites' section.

            Bugs

            POSIX specifies that a number of system calls (basically, all @@ -157,7 +157,7 @@

            Bugs

            , write(2) , wait(2) , etc.) and library functions that may call these system calls (e.g. fprintf(3) ) are cancellation -points. Pthreads-win32 is not integrated enough with the C +points. PThreads4W is not integrated enough with the C library to implement this, and thus none of the C library functions is a cancellation point.

            diff --git a/manual/pthread_cleanup_push.html b/manual/pthread_cleanup_push.html index e7325f1c..2eda0a5b 100644 --- a/manual/pthread_cleanup_push.html +++ b/manual/pthread_cleanup_push.html @@ -5,7 +5,7 @@ PTHREAD_CLEANUP_PUSH(3) manual page -

            POSIX Threads for Windows – REFERENCE - Pthreads-w32

            +

            POSIX Threads for Windows – REFERENCE - Pthreads4W

            Reference Index

            Table of Contents

            Name

            @@ -70,7 +70,7 @@

            Author

            <Xavier.Leroy@inria.fr>
            Modified by -Ross Johnson for use with Pthreads-w32.
            +Ross Johnson for use with PThreads4W.

            See Also

            pthread_exit(3) , pthread_cancel(3) , diff --git a/manual/pthread_cond_init.html b/manual/pthread_cond_init.html index b03ac759..9c886846 100644 --- a/manual/pthread_cond_init.html +++ b/manual/pthread_cond_init.html @@ -5,7 +5,7 @@ PTHREAD_COND_INIT(3) manual page -

            POSIX Threads for Windows – REFERENCE - Pthreads-w32

            +

            POSIX Threads for Windows – REFERENCE - Pthreads4W

            Reference Index

            Table of Contents

            Name

            @@ -54,7 +54,7 @@

            Description

            Variables of type pthread_cond_t can also be initialized statically, using the constant PTHREAD_COND_INITIALIZER. In -the Pthreads-w32 implementation, an application should still +the PThreads4W implementation, an application should still call pthread_cond_destroy at some point to ensure that any resources consumed by the condition variable are released.

            pthread_cond_signal restarts one of the threads that are @@ -211,7 +211,7 @@

            Author

            Xavier Leroy <Xavier.Leroy@inria.fr>

            -

            Modified by Ross Johnson for use with Pthreads-w32.

            +

            Modified by Ross Johnson for use with Pthreads4W.

            See Also

            pthread_condattr_init(3) , pthread_mutex_lock(3) diff --git a/manual/pthread_condattr_init.html b/manual/pthread_condattr_init.html index e61e6851..3c6f7cf4 100644 --- a/manual/pthread_condattr_init.html +++ b/manual/pthread_condattr_init.html @@ -5,7 +5,7 @@ PTHREAD_CONDATTR_INIT(3) manual page -

            POSIX Threads for Windows – REFERENCE - Pthreads-w32

            +

            POSIX Threads for Windows – REFERENCE - Pthreads4W

            Reference Index

            Table of Contents

            Name

            @@ -32,7 +32,7 @@

            Description

            object attr and fills it with default values for the attributes. pthread_condattr_destroy destroys a condition attribute object, which must not be reused until it is reinitialized.

            -

            Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

            PThreads4W defines _POSIX_THREAD_PROCESS_SHARED in pthread.h as -1 to indicate that the attribute routines are implemented but that the process shared attribute is not supported.

            Return Value

            @@ -64,7 +64,7 @@

            Author

            Xavier Leroy <Xavier.Leroy@inria.fr>

            -

            Modified by Ross Johnson for use with Pthreads-w32.

            +

            Modified by Ross Johnson for use with Pthreads4W.

            See Also

            pthread_cond_init(3) .

            diff --git a/manual/pthread_condattr_setpshared.html b/manual/pthread_condattr_setpshared.html index 24235a83..6f3b2f9d 100644 --- a/manual/pthread_condattr_setpshared.html +++ b/manual/pthread_condattr_setpshared.html @@ -5,7 +5,7 @@ PTHREAD_CONDATTR_SETPSHARED(3) manual page -

            POSIX Threads for Windows – REFERENCE - Pthreads-w32

            +

            POSIX Threads for Windows – REFERENCE - Pthreads4W

            Reference Index

            Table of Contents

            Name

            @@ -39,7 +39,7 @@

            Description

            such a condition variable, the behavior is undefined. The default value of the attribute is PTHREAD_PROCESS_PRIVATE.

            -

            Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

            PThreads4W defines _POSIX_THREAD_PROCESS_SHARED in pthread.h as -1 to indicate that these routines are implemented but that the process shared attribute is not supported.

            Return Value

            @@ -74,7 +74,7 @@

            Errors

            ENOSYS
            The value specified by attr was PTHREAD_PROCESS_SHARED - (Pthreads-w32).
            + (PThreads4W).

            These functions shall not return an error code of [EINTR].

            @@ -84,7 +84,7 @@

            Examples

            None.

            Application Usage

            -

            Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

            PThreads4W defines _POSIX_THREAD_PROCESS_SHARED in pthread.h as -1 to indicate that these routines are implemented and may be used, but do not support the process shared option.

            Rationale

            @@ -113,7 +113,7 @@

            Copyright

            can be obtained online at http://www.opengroup.org/unix/online.html .

            -

            Modified by Ross Johnson for use with Pthreads-w32.

            +

            Modified by Ross Johnson for use with Pthreads4W.


            Table of Contents

              diff --git a/manual/pthread_create.html b/manual/pthread_create.html index 70fd0266..9d58eaf8 100644 --- a/manual/pthread_create.html +++ b/manual/pthread_create.html @@ -1,114 +1,114 @@ - - - - - PTHREAD_CREATE(3) manual page - - - - - - - -

              POSIX Threads for Windows – REFERENCE - -Pthreads-w32

              -

              Reference Index

              -

              Table of Contents

              -

              Name

              -

              pthread_create - create a new thread -

              -

              Synopsis

              -

              #include <pthread.h> -

              -

              int pthread_create(pthread_t * thread, -pthread_attr_t * attr, void * (*start_routine)(void -*), void * arg); -

              -

              Description

              -

              pthread_create creates a new thread of control that -executes concurrently with the calling thread. The new thread applies -the function start_routine passing it arg as first -argument. The new thread terminates either explicitly, by calling -pthread_exit(3) , or -implicitly, by returning from the start_routine function. The -latter case is equivalent to calling pthread_exit(3) -with the result returned by start_routine as exit code. -

              -

              The initial signal state of the new thread is inherited from it's -creating thread and there are no pending signals. Pthreads-w32 -does not yet implement signals.

              -

              The initial CPU affinity of the new thread is inherited from it's -creating thread. A threads CPU affinity can be obtained through -pthread_getaffinity_np(3) -and may be changed through pthread_setaffinity_np(3). -Unless changed, all threads inherit the CPU affinity of the parent -process. See sched_getaffinity(3) -and sched_setaffinity(3).

              -

              The attr argument specifies thread attributes to be applied -to the new thread. See pthread_attr_init(3) -for a complete list of thread attributes. The attr argument -can also be NULL, in which case default attributes are used: -the created thread is joinable (not detached) and has default (non -real-time) scheduling policy. -

              -

              Return Value

              -

              On success, the identifier of the newly created thread is stored -in the location pointed by the thread argument, and a 0 is -returned. On error, a non-zero error code is returned. -

              -

              Errors

              -
              -
              -
              EAGAIN
              -
              -
              - Not enough system resources to create a process for the new - thread, or
              more than PTHREAD_THREADS_MAX threads are - already active. -
              -
              -
              -
              -

              -Author

              -

              Xavier Leroy <Xavier.Leroy@inria.fr> -

              -

              Modified by Ross Johnson for use with Pthreads-w32.

              -

              See Also

              -

              pthread_exit(3) , -pthread_join(3) , -pthread_detach(3) , -pthread_attr_init(3) , -pthread_getaffinity_np(3) -, pthread_setaffinity_np(3) -, sched_getaffinity(3) , -sched_setaffinity(3) . -

              -
              -

              Table of Contents

              - - + + + + + PTHREAD_CREATE(3) manual page + + + + + + + +

              POSIX Threads for Windows – REFERENCE - +Pthreads4W

              +

              Reference Index

              +

              Table of Contents

              +

              Name

              +

              pthread_create - create a new thread +

              +

              Synopsis

              +

              #include <pthread.h> +

              +

              int pthread_create(pthread_t * thread, +pthread_attr_t * attr, void * (*start_routine)(void +*), void * arg); +

              +

              Description

              +

              pthread_create creates a new thread of control that +executes concurrently with the calling thread. The new thread applies +the function start_routine passing it arg as first +argument. The new thread terminates either explicitly, by calling +pthread_exit(3) , or +implicitly, by returning from the start_routine function. The +latter case is equivalent to calling pthread_exit(3) +with the result returned by start_routine as exit code. +

              +

              The initial signal state of the new thread is inherited from it's +creating thread and there are no pending signals. PThreads4W +does not yet implement signals.

              +

              The initial CPU affinity of the new thread is inherited from it's +creating thread. A threads CPU affinity can be obtained through +pthread_getaffinity_np(3) +and may be changed through pthread_setaffinity_np(3). +Unless changed, all threads inherit the CPU affinity of the parent +process. See sched_getaffinity(3) +and sched_setaffinity(3).

              +

              The attr argument specifies thread attributes to be applied +to the new thread. See pthread_attr_init(3) +for a complete list of thread attributes. The attr argument +can also be NULL, in which case default attributes are used: +the created thread is joinable (not detached) and has default (non +real-time) scheduling policy. +

              +

              Return Value

              +

              On success, the identifier of the newly created thread is stored +in the location pointed by the thread argument, and a 0 is +returned. On error, a non-zero error code is returned. +

              +

              Errors

              +
              +
              +
              EAGAIN
              +
              +
              + Not enough system resources to create a process for the new + thread, or
              more than PTHREAD_THREADS_MAX threads are + already active. +
              +
              +
              +
              +

              +Author

              +

              Xavier Leroy <Xavier.Leroy@inria.fr> +

              +

              Modified by Ross Johnson for use with Pthreads4W.

              +

              See Also

              +

              pthread_exit(3) , +pthread_join(3) , +pthread_detach(3) , +pthread_attr_init(3) , +pthread_getaffinity_np(3) +, pthread_setaffinity_np(3) +, sched_getaffinity(3) , +sched_setaffinity(3) . +

              +
              +

              Table of Contents

              + + \ No newline at end of file diff --git a/manual/pthread_delay_np.html b/manual/pthread_delay_np.html index fec6356c..6570444d 100644 --- a/manual/pthread_delay_np.html +++ b/manual/pthread_delay_np.html @@ -5,7 +5,7 @@ PTHREAD_DELAY_NP(3) manual page -

              POSIX Threads for Windows – REFERENCE - Pthreads-w32

              +

              POSIX Threads for Windows – REFERENCE - Pthreads4W

              Reference Index

              Table of Contents

              Name

              @@ -42,7 +42,7 @@

              Errors

              The value specified by interval is invalid.

              Author

              -

              Ross Johnson for use with Pthreads-w32.

              +

              Ross Johnson for use with Pthreads4W.


              Table of Contents

                diff --git a/manual/pthread_detach.html b/manual/pthread_detach.html index 52dffa70..779b0320 100644 --- a/manual/pthread_detach.html +++ b/manual/pthread_detach.html @@ -5,7 +5,7 @@ PTHREAD_DETACH(3) manual page -

                POSIX Threads for Windows – REFERENCE - Pthreads-w32

                +

                POSIX Threads for Windows – REFERENCE - Pthreads4W

                Reference Index

                Table of Contents

                Name

                @@ -55,7 +55,7 @@

                Author

                Xavier Leroy <Xavier.Leroy@inria.fr>

                -

                Modified by Ross Johnson for use with Pthreads-w32.

                +

                Modified by Ross Johnson for use with PThreads4W.

                See Also

                pthread_create(3) , pthread_join(3) , diff --git a/manual/pthread_equal.html b/manual/pthread_equal.html index d2f81b61..4503e66e 100644 --- a/manual/pthread_equal.html +++ b/manual/pthread_equal.html @@ -1,63 +1,63 @@ - - - - - PTHREAD_EQUAL(3) manual page - - - - - - - -

                Table of Contents

                -

                Name

                -

                pthread_equal - compare two thread identifiers -

                -

                Synopsis

                -

                #include <pthread.h> -

                -

                int pthread_equal(pthread_t thread1, -pthread_t thread2); -

                -

                Description

                -

                pthread_equal determines if two thread -identifiers refer to the same thread. -

                -

                Return -Value

                -

                A non-zero value is returned if thread1 and -thread2 refer to the same thread. Otherwise, 0 is returned. -

                -

                Author

                -

                Xavier Leroy <Xavier.Leroy@inria.fr> -

                -

                See -Also

                -

                pthread_self(3) -. -

                -
                -

                Table of Contents

                - - + + + + + PTHREAD_EQUAL(3) manual page + + + + + + + +

                Table of Contents

                +

                Name

                +

                pthread_equal - compare two thread identifiers +

                +

                Synopsis

                +

                #include <pthread.h> +

                +

                int pthread_equal(pthread_t thread1, +pthread_t thread2); +

                +

                Description

                +

                pthread_equal determines if two thread +identifiers refer to the same thread. +

                +

                Return +Value

                +

                A non-zero value is returned if thread1 and +thread2 refer to the same thread. Otherwise, 0 is returned. +

                +

                Author

                +

                Xavier Leroy <Xavier.Leroy@inria.fr> +

                +

                See +Also

                +

                pthread_self(3) +. +

                +
                +

                Table of Contents

                + + \ No newline at end of file diff --git a/manual/pthread_exit.html b/manual/pthread_exit.html index e70b6b71..715bf610 100644 --- a/manual/pthread_exit.html +++ b/manual/pthread_exit.html @@ -1,71 +1,71 @@ - - - - - PTHREAD_EXIT(3) manual page - - - - - - - -

                Table of Contents

                -

                Name

                -

                pthread_exit - terminate the calling thread -

                -

                Synopsis

                -

                #include <pthread.h> -

                -

                void pthread_exit(void *retval); -

                -

                Description

                -

                pthread_exit terminates the execution of the -calling thread. All cleanup handlers that have been set for the -calling thread with pthread_cleanup_push(3) -are executed in reverse order (the most recently pushed handler is -executed first). Finalization functions for thread-specific data are -then called for all keys that have non- NULL values associated -with them in the calling thread (see pthread_key_create(3) -). Finally, execution of the calling thread is stopped. -

                -

                The retval argument is the return value of the -thread. It can be consulted from another thread using pthread_join(3) -. -

                -

                Return -Value

                -

                The pthread_exit function never returns. -

                -

                Author

                -

                Xavier Leroy <Xavier.Leroy@inria.fr> -

                -

                See -Also

                -

                pthread_create(3) -, pthread_join(3) . -

                -
                -

                Table of Contents

                - - + + + + + PTHREAD_EXIT(3) manual page + + + + + + + +

                Table of Contents

                +

                Name

                +

                pthread_exit - terminate the calling thread +

                +

                Synopsis

                +

                #include <pthread.h> +

                +

                void pthread_exit(void *retval); +

                +

                Description

                +

                pthread_exit terminates the execution of the +calling thread. All cleanup handlers that have been set for the +calling thread with pthread_cleanup_push(3) +are executed in reverse order (the most recently pushed handler is +executed first). Finalization functions for thread-specific data are +then called for all keys that have non- NULL values associated +with them in the calling thread (see pthread_key_create(3) +). Finally, execution of the calling thread is stopped. +

                +

                The retval argument is the return value of the +thread. It can be consulted from another thread using pthread_join(3) +. +

                +

                Return +Value

                +

                The pthread_exit function never returns. +

                +

                Author

                +

                Xavier Leroy <Xavier.Leroy@inria.fr> +

                +

                See +Also

                +

                pthread_create(3) +, pthread_join(3) . +

                +
                +

                Table of Contents

                + + \ No newline at end of file diff --git a/manual/pthread_getunique_np.html b/manual/pthread_getunique_np.html index e13cf0a4..191d43eb 100755 --- a/manual/pthread_getunique_np.html +++ b/manual/pthread_getunique_np.html @@ -14,7 +14,7 @@

                POSIX Threads for Windows – REFERENCE - -Pthreads-w32

                +Pthreads4W

                Reference Index

                Table of Contents

                Name

                @@ -27,7 +27,7 @@

                Synopsis

                Description

                Returns the unique 64 bit sequence number assigned to thread.

                -

                In Pthreads-win32:

                +

                In PThreads4W:

                • the value returned is not reused after the thread terminates so it is unique for the life of the process

                  @@ -45,7 +45,7 @@

                  Return Value

                  Errors

                  None.

                  Author

                  -

                  Ross Johnson for use with Pthreads-w32.

                  +

                  Ross Johnson for use with Pthreads4W.


                  Table of Contents

                    diff --git a/manual/pthread_getw32threadhandle_np.html b/manual/pthread_getw32threadhandle_np.html index fb291108..d4899c36 100644 --- a/manual/pthread_getw32threadhandle_np.html +++ b/manual/pthread_getw32threadhandle_np.html @@ -5,7 +5,7 @@ PTHREAD_GETW32THREADHANDLE_NP(3) manual page -

                    POSIX Threads for Windows – REFERENCE - Pthreads-w32

                    +

                    POSIX Threads for Windows – REFERENCE - Pthreads4W

                    Reference Index

                    Table of Contents

                    Name

                    @@ -28,7 +28,7 @@

                    Return Value

                    Errors

                    None.

                    Author

                    -

                    Ross Johnson for use with Pthreads-w32.

                    +

                    Ross Johnson for use with Pthreads4W.


                    Table of Contents

                      diff --git a/manual/pthread_join.html b/manual/pthread_join.html index 3a0b6dde..f470cdd4 100644 --- a/manual/pthread_join.html +++ b/manual/pthread_join.html @@ -14,7 +14,7 @@

                      POSIX Threads for Windows – REFERENCE - -Pthreads-w32

                      +Pthreads4W

                      Reference Index

                      Table of Contents

                      Name

                      @@ -114,7 +114,7 @@

                      Author

                      Xavier Leroy <Xavier.Leroy@inria.fr>

                      -

                      Modified by Ross Johnson for use with Pthreads-w32. +

                      Modified by Ross Johnson for use with Pthreads4W.

                      See Also

                      pthread_exit(3) , diff --git a/manual/pthread_key_create.html b/manual/pthread_key_create.html index 6f06d75f..3f1d566e 100644 --- a/manual/pthread_key_create.html +++ b/manual/pthread_key_create.html @@ -5,7 +5,7 @@ PTHREAD_KEY_CREATE(3) manual page -

                      POSIX Threads for Windows – REFERENCE - Pthreads-w32

                      +

                      POSIX Threads for Windows – REFERENCE - Pthreads4W

                      Reference Index

                      Table of Contents

                      Name

                      @@ -89,7 +89,7 @@

                      Description

                      either memory leakage or infinite loops if destr_function has already been called at least PTHREAD_DESTRUCTOR_ITERATIONS times.

                      -

                      Pthreads-w32 stops running key +

                      PThreads4W stops running key destr_function routines after PTHREAD_DESTRUCTOR_ITERATIONS iterations, even if some non- NULL values with associated descriptors remain. If memory is allocated and associated with a key @@ -142,7 +142,7 @@

                      Errors

                      Author

                      Xavier Leroy <Xavier.Leroy@inria.fr>

                      -

                      Modified by Ross Johnson for use with Pthreads-w32.

                      +

                      Modified by Ross Johnson for use with Pthreads4W.

                      See Also

                      pthread_create(3) , pthread_exit(3) , diff --git a/manual/pthread_kill.html b/manual/pthread_kill.html index 64cf2235..005e937b 100644 --- a/manual/pthread_kill.html +++ b/manual/pthread_kill.html @@ -5,7 +5,7 @@ PTHREAD_KILL(3) manual page -

                      POSIX Threads for Windows – REFERENCE - Pthreads-w32

                      +

                      POSIX Threads for Windows – REFERENCE - Pthreads4W

                      Reference Index

                      Table of Contents

                      Name

                      @@ -25,7 +25,7 @@

                      Description

                      pthread_sigmask changes the signal mask for the calling thread as described by the how and newmask arguments. If oldmask is not NULL, the previous signal mask is -stored in the location pointed to by oldmask. Pthreads-w32 +stored in the location pointed to by oldmask. PThreads4W implements this function but no other function uses the signal mask yet.

                      The meaning of the how and newmask arguments is the @@ -41,7 +41,7 @@

                      Description

                      shared between all threads.

                      pthread_kill send signal number signo to the thread -thread. Pthreads-w32 only supports signal number 0, +thread. PThreads4W only supports signal number 0, which does not send any signal but causes pthread_kill to return an error if thread is not valid.

                      sigwait suspends the calling thread until one of the @@ -50,7 +50,7 @@

                      Description

                      by sig and returns. The signals in set must be blocked and not ignored on entrance to sigwait. If the delivered signal has a signal handler function attached, that function is not -called. Pthreads-w32 implements this function as a +called. PThreads4W implements this function as a cancellation point only - it does not wait for any signals and does not change the location pointed to by sig.

                      Cancellation

                      @@ -93,7 +93,7 @@

                      Errors

                      Author

                      Xavier Leroy <Xavier.Leroy@inria.fr>

                      -

                      Modified by Ross Johnson for use with Pthreads-w32.

                      +

                      Modified by Ross Johnson for use with Pthreads4W.

                      See Also

                      @@ -108,13 +108,13 @@

                      Notes

                      because all threads inherit their initial sigmask from their creating thread.

                      Bugs

                      -

                      Pthreads-w32 does not implement signals yet and so these +

                      PThreads4W does not implement signals yet and so these routines have almost no use except to prevent the compiler or linker from complaining. pthread_kill is useful in determining if the thread is a valid thread, but since many threads implementations reuse thread IDs, the valid thread may no longer be the thread you think it is, and so this method of determining thread validity is not -portable, and very risky. Pthreads-w32 from version 1.0.0 +portable, and very risky. PThreads4W from version 1.0.0 onwards implements pseudo-unique thread IDs, so applications that use this technique (but really shouldn't) have some protection.


                      diff --git a/manual/pthread_mutex_init.html b/manual/pthread_mutex_init.html index 772a6685..8eae6cc5 100644 --- a/manual/pthread_mutex_init.html +++ b/manual/pthread_mutex_init.html @@ -16,7 +16,7 @@

                      POSIX Threads for Windows – REFERENCE - -Pthreads-w32

                      +Pthreads4W

                      Reference Index

                      Table of Contents

                      Name

                      @@ -86,7 +86,7 @@

                      Description

                      normal “fast� mutexes), PTHREAD_RECURSIVE_MUTEX_INITIALIZER (for recursive mutexes), and PTHREAD_ERRORCHECK_MUTEX_INITIALIZER (for error checking mutexes). In -the Pthreads-w32 implementation, +the PThreads4W implementation, an application should still call pthread_mutex_destroy at some point to ensure that any resources consumed by the mutex are released.

                      @@ -135,7 +135,7 @@

                      Description

                      state. If it is of the ‘‘recursive’’ type, it decrements the locking count of the mutex (number of pthread_mutex_lock operations performed on it by the calling thread), and only when this -count reaches zero is the mutex actually unlocked. In Pthreads-win32, +count reaches zero is the mutex actually unlocked. In PThreads4W, non-robust normal or default mutex types do not check the owner of the mutex. For all types of robust mutexes the owner is checked and an error code is returned if the calling thread does not own the @@ -295,7 +295,7 @@

                      Author

                      Xavier Leroy <Xavier.Leroy@inria.fr>

                      -

                      Modified by Ross Johnson for use with Pthreads-w32.

                      +

                      Modified by Ross Johnson for use with Pthreads4W.

                      See Also

                      pthread_mutexattr_init(3) , pthread_mutexattr_settype(3) diff --git a/manual/pthread_mutexattr_init.html b/manual/pthread_mutexattr_init.html index 7d8c7a98..1b3f1191 100644 --- a/manual/pthread_mutexattr_init.html +++ b/manual/pthread_mutexattr_init.html @@ -14,7 +14,7 @@

                      POSIX Threads for Windows – REFERENCE - -Pthreads-w32

                      +Pthreads4W

                      Reference Index

                      Table of Contents

                      Name

                      @@ -67,7 +67,7 @@

                      Description

                      the mutex kind attribute in attr and stores it in the location pointed to by type.

                      -

                      Pthreads-w32 also recognises the following equivalent +

                      PThreads4W also recognises the following equivalent functions that are used in Linux:

                      pthread_mutexattr_setkind_np is an alias for pthread_mutexattr_settype. @@ -98,7 +98,7 @@

                      Description

                      state.

                      The default mutex type is PTHREAD_MUTEX_NORMAL

                      -

                      Pthreads-w32 also recognises the following equivalent types +

                      PThreads4W also recognises the following equivalent types that are used by Linux:

                      PTHREAD_MUTEX_FAST_NP – equivalent to PTHREAD_MUTEX_NORMAL

                      @@ -163,7 +163,7 @@

                      Return Value

                      Author

                      Xavier Leroy <Xavier.Leroy@inria.fr>

                      -

                      Modified by Ross Johnson for use with Pthreads-w32.

                      +

                      Modified by Ross Johnson for use with Pthreads4W.

                      See Also

                      pthread_mutex_init(3) , pthread_mutex_lock(3) @@ -171,7 +171,7 @@

                      See Also

                      .

                      Notes

                      -

                      For speed, Pthreads-w32 never checks the thread ownership +

                      For speed, PThreads4W never checks the thread ownership of non-robust mutexes of type PTHREAD_MUTEX_NORMAL (or PTHREAD_MUTEX_FAST_NP) when performing operations on the mutex. It is therefore possible for one thread to lock such a mutex diff --git a/manual/pthread_mutexattr_setpshared.html b/manual/pthread_mutexattr_setpshared.html index 3a7df5c0..c3100b81 100644 --- a/manual/pthread_mutexattr_setpshared.html +++ b/manual/pthread_mutexattr_setpshared.html @@ -5,7 +5,7 @@ PTHREAD_MUTEXATTR_SETPSHARED(3) manual page -

                      POSIX Threads for Windows – REFERENCE - Pthreads-w32

                      +

                      POSIX Threads for Windows – REFERENCE - Pthreads4W

                      Reference Index

                      Table of Contents

                      Name

                      @@ -38,7 +38,7 @@

                      Description

                      operate on such a mutex, the behavior is undefined. The default value of the attribute shall be PTHREAD_PROCESS_PRIVATE.

                      -

                      Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

                      PThreads4W defines _POSIX_THREAD_PROCESS_SHARED in pthread.h as -1 to indicate that these routines are implemented but the process shared option is not supported.

                      Return Value

                      @@ -111,7 +111,7 @@

                      Copyright

                      can be obtained online at http://www.opengroup.org/unix/online.html .

                      -

                      Modified by Ross Johnson for use with Pthreads-w32.

                      +

                      Modified by Ross Johnson for use with Pthreads4W.


                      Table of Contents

                        diff --git a/manual/pthread_num_processors_np.html b/manual/pthread_num_processors_np.html index f3e15116..ab148c36 100644 --- a/manual/pthread_num_processors_np.html +++ b/manual/pthread_num_processors_np.html @@ -5,7 +5,7 @@ PTHREAD_NUM_PROCESSORS_NP(3) manual page -

                        POSIX Threads for Windows – REFERENCE - Pthreads-w32

                        +

                        POSIX Threads for Windows – REFERENCE - Pthreads4W

                        Reference Index

                        Table of Contents

                        Name

                        @@ -28,7 +28,7 @@

                        Return ValueErrors

                        None.

                        Author

                        -

                        Ross Johnson for use with Pthreads-w32.

                        +

                        Ross Johnson for use with Pthreads4W.


                        Table of Contents

                          diff --git a/manual/pthread_once.html b/manual/pthread_once.html index 1597fa27..69903faf 100644 --- a/manual/pthread_once.html +++ b/manual/pthread_once.html @@ -5,7 +5,7 @@ PTHREAD_ONCE(3) manual page -

                          POSIX Threads for Windows – REFERENCE - Pthreads-w32

                          +

                          POSIX Threads for Windows – REFERENCE - Pthreads4W

                          Reference Index

                          Table of Contents

                          Name

                          @@ -54,7 +54,7 @@

                          Errors

                          Author

                          Xavier Leroy <Xavier.Leroy@inria.fr>

                          -

                          Modified by Ross Johnson for use with Pthreads-w32.

                          +

                          Modified by Ross Johnson for use with Pthreads4W.


                          Table of Contents

                            diff --git a/manual/pthread_rwlock_init.html b/manual/pthread_rwlock_init.html index 3c58b027..5ab9aa68 100644 --- a/manual/pthread_rwlock_init.html +++ b/manual/pthread_rwlock_init.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCK_INIT(3) manual page -

                            POSIX Threads for Windows – REFERENCE - Pthreads-w32

                            +

                            POSIX Threads for Windows – REFERENCE - Pthreads4W

                            Reference Index

                            Table of Contents

                            Name

                            @@ -48,7 +48,7 @@

                            Description

                            shall not be initialized and the contents of rwlock are undefined.

                            -

                            Pthreads-w32 supports statically initialized rwlock +

                            PThreads4W supports statically initialized rwlock objects using PTHREAD_RWLOCK_INITIALIZER. An application should still call pthread_rwlock_destroy at some point to ensure that any resources consumed by the read/write @@ -61,7 +61,7 @@

                            Description

                            pthread_rwlock_trywrlock , pthread_rwlock_unlock , or pthread_rwlock_wrlock is undefined.

                            -

                            Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                            PThreads4W defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                            Return Value

                            @@ -153,7 +153,7 @@

                            Copyright

                            can be obtained online at http://www.opengroup.org/unix/online.html .

                            -

                            Modified by Ross Johnson for use with Pthreads-w32.

                            +

                            Modified by Ross Johnson for use with Pthreads4W.


                            Table of Contents

                              diff --git a/manual/pthread_rwlock_rdlock.html b/manual/pthread_rwlock_rdlock.html index 43927a5f..a9a13df6 100644 --- a/manual/pthread_rwlock_rdlock.html +++ b/manual/pthread_rwlock_rdlock.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCK_RDLOCK(3) manual page -

                              POSIX Threads for Windows – REFERENCE - Pthreads-w32

                              +

                              POSIX Threads for Windows – REFERENCE - Pthreads4W

                              Reference Index

                              Table of Contents

                              Name

                              @@ -25,7 +25,7 @@

                              Description

                              thread acquires the read lock if a writer does not hold the lock and there are no writers blocked on the lock.

                              -

                              Pthreads-win32 does not prefer either writers or readers in +

                              PThreads4W does not prefer either writers or readers in acquiring the lock – all threads enter a single prioritised FIFO queue. While this may not be optimally efficient for some applications, it does ensure that one type does not starve the other.

                              @@ -47,9 +47,9 @@

                              Description

                              Results are undefined if any of these functions are called with an uninitialized read-write lock.

                              -

                              Pthreads-w32 does not detect deadlock if the thread already +

                              PThreads4W does not detect deadlock if the thread already owns the lock for writing.

                              -

                              Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                              PThreads4W defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                              Return Value

                              @@ -128,7 +128,7 @@

                              Copyright

                              can be obtained online at http://www.opengroup.org/unix/online.html .

                              -

                              Modified by Ross Johnson for use with Pthreads-w32.

                              +

                              Modified by Ross Johnson for use with Pthreads4W.


                              Table of Contents

                                diff --git a/manual/pthread_rwlock_timedrdlock.html b/manual/pthread_rwlock_timedrdlock.html index da570e58..e135f8df 100644 --- a/manual/pthread_rwlock_timedrdlock.html +++ b/manual/pthread_rwlock_timedrdlock.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCK_TIMEDRDLOCK(3) manual page -

                                POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                +

                                POSIX Threads for Windows – REFERENCE - Pthreads4W

                                Reference Index

                                Table of Contents

                                Name

                                @@ -41,7 +41,7 @@

                                Description

                                holds a write lock on rwlock. The results are undefined if this function is called with an uninitialized read-write lock.

                                -

                                Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                PThreads4W defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                                Return Value

                                @@ -116,7 +116,7 @@

                                Copyright

                                can be obtained online at http://www.opengroup.org/unix/online.html .

                                -

                                Modified by Ross Johnson for use with Pthreads-w32.

                                +

                                Modified by Ross Johnson for use with Pthreads4W.


                                Table of Contents

                                  diff --git a/manual/pthread_rwlock_timedwrlock.html b/manual/pthread_rwlock_timedwrlock.html index 5b439bbd..f2f853dd 100644 --- a/manual/pthread_rwlock_timedwrlock.html +++ b/manual/pthread_rwlock_timedwrlock.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCK_TIMEDWRLOCK(3) manual page -

                                  POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                  +

                                  POSIX Threads for Windows – REFERENCE - Pthreads4W

                                  Reference Index

                                  Table of Contents

                                  Name

                                  @@ -41,7 +41,7 @@

                                  Description

                                  holds the read-write lock. The results are undefined if this function is called with an uninitialized read-write lock.

                                  -

                                  Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                  PThreads4W defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                                  Return Value

                                  @@ -110,7 +110,7 @@

                                  Copyright

                                  can be obtained online at http://www.opengroup.org/unix/online.html .

                                  -

                                  Modified by Ross Johnson for use with Pthreads-w32.

                                  +

                                  Modified by Ross Johnson for use with Pthreads4W.


                                  Table of Contents

                                    diff --git a/manual/pthread_rwlock_unlock.html b/manual/pthread_rwlock_unlock.html index 88444254..583faa0d 100644 --- a/manual/pthread_rwlock_unlock.html +++ b/manual/pthread_rwlock_unlock.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCK_UNLOCK(3) manual page -

                                    POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                    +

                                    POSIX Threads for Windows – REFERENCE - Pthreads4W

                                    Reference Index

                                    Table of Contents

                                    Name

                                    @@ -34,14 +34,14 @@

                                    Description

                                    read-write lock object, the read-write lock object shall be put in the unlocked state.

                                    -

                                    Pthreads-win32 does not prefer either writers or readers in +

                                    PThreads4W does not prefer either writers or readers in acquiring the lock – all threads enter a single prioritised FIFO queue. While this may not be optimally efficient for some applications, it does ensure that one type does not starve the other.

                                    Results are undefined if any of these functions are called with an uninitialized read-write lock.

                                    -

                                    Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                    PThreads4W defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                                    Return Value

                                    @@ -101,7 +101,7 @@

                                    Copyright

                                    can be obtained online at http://www.opengroup.org/unix/online.html .

                                    -

                                    Modified by Ross Johnson for use with Pthreads-w32.

                                    +

                                    Modified by Ross Johnson for use with Pthreads4W.


                                    Table of Contents

                                      diff --git a/manual/pthread_rwlock_wrlock.html b/manual/pthread_rwlock_wrlock.html index 16c32faf..7e165b34 100644 --- a/manual/pthread_rwlock_wrlock.html +++ b/manual/pthread_rwlock_wrlock.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCK_WRLOCK(3) manual page -

                                      POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                      +

                                      POSIX Threads for Windows – REFERENCE - Pthreads4W

                                      Reference Index

                                      Table of Contents

                                      Name

                                      @@ -33,14 +33,14 @@

                                      Description

                                      if at the time the call is made it holds the read-write lock (whether a read or write lock).

                                      -

                                      Pthreads-win32 does not prefer either writers or readers in +

                                      PThreads4W does not prefer either writers or readers in acquiring the lock – all threads enter a single prioritised FIFO queue. While this may not be optimally efficient for some applications, it does ensure that one type does not starve the other.

                                      Results are undefined if any of these functions are called with an uninitialized read-write lock.

                                      -

                                      Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                      PThreads4W defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                                      Return Value

                                      @@ -113,7 +113,7 @@

                                      Copyright

                                      can be obtained online at http://www.opengroup.org/unix/online.html .

                                      -

                                      Modified by Ross Johnson for use with Pthreads-w32.

                                      +

                                      Modified by Ross Johnson for use with Pthreads4W.


                                      Table of Contents

                                        diff --git a/manual/pthread_rwlockattr_init.html b/manual/pthread_rwlockattr_init.html index f5894c6e..c9d04eaa 100644 --- a/manual/pthread_rwlockattr_init.html +++ b/manual/pthread_rwlockattr_init.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCKATTR_INIT(3) manual page -

                                        POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                        +

                                        POSIX Threads for Windows – REFERENCE - Pthreads4W

                                        Reference Index

                                        Table of Contents

                                        Name

                                        @@ -40,7 +40,7 @@

                                        Description

                                        attributes object (including destruction) shall not affect any previously initialized read-write locks.

                                        -

                                        Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                        PThreads4W defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                                        Return Value

                                        @@ -101,7 +101,7 @@

                                        Copyright

                                        can be obtained online at http://www.opengroup.org/unix/online.html .

                                        -

                                        Modified by Ross Johnson for use with Pthreads-w32.

                                        +

                                        Modified by Ross Johnson for use with Pthreads4W.


                                        Table of Contents

                                          diff --git a/manual/pthread_rwlockattr_setpshared.html b/manual/pthread_rwlockattr_setpshared.html index d39d4343..dfe033e1 100644 --- a/manual/pthread_rwlockattr_setpshared.html +++ b/manual/pthread_rwlockattr_setpshared.html @@ -5,7 +5,7 @@ PTHREAD_RWLOCKATTR_SETPSHARED(3) manual page -

                                          POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                          +

                                          POSIX Threads for Windows – REFERENCE - Pthreads4W

                                          Reference Index

                                          Table of Contents

                                          Name

                                          @@ -41,14 +41,14 @@

                                          Description

                                          read-write lock, the behavior is undefined. The default value of the process-shared attribute shall be PTHREAD_PROCESS_PRIVATE.

                                          -

                                          Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

                                          PThreads4W defines _POSIX_THREAD_PROCESS_SHARED in pthread.h as -1 to indicate that these routines are implemented but they do not support the process shared option.

                                          Additional attributes, their default values, and the names of the associated functions to get and set those attribute values are implementation-defined.

                                          -

                                          Pthreads-w32 defines _POSIX_READER_WRITER_LOCKS in +

                                          PThreads4W defines _POSIX_READER_WRITER_LOCKS in pthread.h as 200112L to indicate that the reader/writer routines are implemented and may be used.

                                          Return Value

                                          @@ -120,7 +120,7 @@

                                          Copyright

                                          can be obtained online at http://www.opengroup.org/unix/online.html .

                                          -

                                          Modified by Ross Johnson for use with Pthreads-w32.

                                          +

                                          Modified by Ross Johnson for use with Pthreads4W.


                                          Table of Contents

                                            diff --git a/manual/pthread_self.html b/manual/pthread_self.html index debf79b3..f0080eaa 100644 --- a/manual/pthread_self.html +++ b/manual/pthread_self.html @@ -5,7 +5,7 @@ PTHREAD_SELF(3) manual page -

                                            POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                            +

                                            POSIX Threads for Windows – REFERENCE - Pthreads4W

                                            Reference Index

                                            Table of Contents

                                            Name

                                            @@ -20,7 +20,7 @@

                                            Description

                                            pthread_self return the thread identifier for the calling thread.

                                            -

                                            Pthreads-w32 also provides support for Win32 native +

                                            PThreads4W also provides support for Win32 native threads to interact with POSIX threads through the pthreads API. Whereas all threads created via a call to pthread_create have a POSIX thread ID and thread state, the library ensures that any Win32 native @@ -33,12 +33,12 @@

                                            Description

                                            Any Win32 native thread may call pthread_self directly to return it's POSIX thread identifier. The ID and state will be generated if it does not already exist. Win32 native threads do not -need to call pthread_self before calling Pthreads-w32 routines +need to call pthread_self before calling PThreads4W routines unless that routine requires a pthread_t parameter.

                                            Author

                                            Xavier Leroy <Xavier.Leroy@inria.fr>

                                            -

                                            Modified by Ross Johnson for use with Pthreads-w32.

                                            +

                                            Modified by Ross Johnson for use with Pthreads4W.

                                            See Also

                                            pthread_equal(3) , pthread_join(3) , diff --git a/manual/pthread_setaffinity_np.html b/manual/pthread_setaffinity_np.html index e20e8e22..39831711 100644 --- a/manual/pthread_setaffinity_np.html +++ b/manual/pthread_setaffinity_np.html @@ -13,7 +13,7 @@

                                            POSIX -Threads for Windows – REFERENCE - Pthreads-w32

                                            +Threads for Windows – REFERENCE - Pthreads4W

                                            Reference Index

                                            Table of Contents

                                            Name

                                            @@ -44,7 +44,7 @@

                                            Description

                                            whose ID is tid into the cpu_set_t structure pointed to by mask. The cpusetsize argument specifies the size (in bytes) of mask. -

                                            Pthreads-w32 currently ignores the cpusetsize +

                                            PThreads4W currently ignores the cpusetsize parameter for either function because cpu_set_t is a direct typeset to the Windows affinity vector type DWORD_PTR.

                                            Return Value

                                            @@ -107,7 +107,7 @@

                                            See Also

                                            sched_getaffinity(3)

                                            Copyright

                                            Most of this is taken from the Linux manual page.

                                            -

                                            Modified by Ross Johnson for use with Pthreads-w32.

                                            +

                                            Modified by Ross Johnson for use with PThreads4W.


                                            Table of Contents

                                              diff --git a/manual/pthread_setcancelstate.html b/manual/pthread_setcancelstate.html index b4e6ffd7..231625cc 100644 --- a/manual/pthread_setcancelstate.html +++ b/manual/pthread_setcancelstate.html @@ -5,7 +5,7 @@ PTHREAD_SETCANCELSTATE(3) manual page -

                                              POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                              +

                                              POSIX Threads for Windows – REFERENCE - Pthreads4W

                                              Reference Index

                                              Table of Contents

                                              Name

                                              @@ -64,14 +64,14 @@

                                              Description

                                              location pointed to by oldtype, and can thus be restored later by another call to pthread_setcanceltype.

                                              -

                                              Pthreads-w32 provides two levels of support for +

                                              PThreads4W provides two levels of support for PTHREAD_CANCEL_ASYNCHRONOUS: full and partial. Full support requires an additional DLL and driver be installed on the Windows system (see the See Also section below) that allows blocked threads to be cancelled immediately. Partial support means that the target thread will not cancel until it resumes execution naturally. Partial support is provided if either the DLL or the driver are not -automatically detected by the pthreads-w32 library at run-time.

                                              +automatically detected by the PThreads4W library at run-time.

                                              Threads are always created by pthread_create(3) with cancellation enabled and deferred. That is, the initial cancellation state is PTHREAD_CANCEL_ENABLE and the initial @@ -88,8 +88,8 @@

                                              Description


                                              pthread_testcancel(3)
                                              sem_wait(3)
                                              sem_timedwait(3)
                                              sigwait(3) (not supported under -Pthreads-w32)

                                              -

                                              Pthreads-w32 provides two functions to enable additional +PThreads4W)

                                              +

                                              PThreads4W provides two functions to enable additional cancellation points to be created in user functions that block on Win32 HANDLEs:

                                              pthreadCancelableWait() @@ -149,12 +149,12 @@

                                              Errors

                                              Author

                                              Xavier Leroy <Xavier.Leroy@inria.fr>

                                              -

                                              Modified by Ross Johnson for use with Pthreads-w32.

                                              +

                                              Modified by Ross Johnson for use with Pthreads4W.

                                              See Also

                                              pthread_exit(3) , pthread_cleanup_push(3) , pthread_cleanup_pop(3) -, Pthreads-w32 package README file 'Prerequisites' section. +, PThreads4W package README file 'Prerequisites' section.

                                              Bugs

                                              POSIX specifies that a number of system calls (basically, all @@ -162,7 +162,7 @@

                                              Bugs

                                              , write(2) , wait(2) , etc.) and library functions that may call these system calls (e.g. fprintf(3) ) are cancellation -points. Pthreads-win32 is not integrated enough with the C +points. PThreads4W is not integrated enough with the C library to implement this, and thus none of the C library functions is a cancellation point.

                                              diff --git a/manual/pthread_setcanceltype.html b/manual/pthread_setcanceltype.html index b4e6ffd7..231625cc 100644 --- a/manual/pthread_setcanceltype.html +++ b/manual/pthread_setcanceltype.html @@ -5,7 +5,7 @@ PTHREAD_SETCANCELSTATE(3) manual page -

                                              POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                              +

                                              POSIX Threads for Windows – REFERENCE - Pthreads4W

                                              Reference Index

                                              Table of Contents

                                              Name

                                              @@ -64,14 +64,14 @@

                                              Description

                                              location pointed to by oldtype, and can thus be restored later by another call to pthread_setcanceltype.

                                              -

                                              Pthreads-w32 provides two levels of support for +

                                              PThreads4W provides two levels of support for PTHREAD_CANCEL_ASYNCHRONOUS: full and partial. Full support requires an additional DLL and driver be installed on the Windows system (see the See Also section below) that allows blocked threads to be cancelled immediately. Partial support means that the target thread will not cancel until it resumes execution naturally. Partial support is provided if either the DLL or the driver are not -automatically detected by the pthreads-w32 library at run-time.

                                              +automatically detected by the PThreads4W library at run-time.

                                              Threads are always created by pthread_create(3) with cancellation enabled and deferred. That is, the initial cancellation state is PTHREAD_CANCEL_ENABLE and the initial @@ -88,8 +88,8 @@

                                              Description


                                              pthread_testcancel(3)
                                              sem_wait(3)
                                              sem_timedwait(3)
                                              sigwait(3) (not supported under -Pthreads-w32)

                                              -

                                              Pthreads-w32 provides two functions to enable additional +PThreads4W)

                                              +

                                              PThreads4W provides two functions to enable additional cancellation points to be created in user functions that block on Win32 HANDLEs:

                                              pthreadCancelableWait() @@ -149,12 +149,12 @@

                                              Errors

                                              Author

                                              Xavier Leroy <Xavier.Leroy@inria.fr>

                                              -

                                              Modified by Ross Johnson for use with Pthreads-w32.

                                              +

                                              Modified by Ross Johnson for use with Pthreads4W.

                                              See Also

                                              pthread_exit(3) , pthread_cleanup_push(3) , pthread_cleanup_pop(3) -, Pthreads-w32 package README file 'Prerequisites' section. +, PThreads4W package README file 'Prerequisites' section.

                                              Bugs

                                              POSIX specifies that a number of system calls (basically, all @@ -162,7 +162,7 @@

                                              Bugs

                                              , write(2) , wait(2) , etc.) and library functions that may call these system calls (e.g. fprintf(3) ) are cancellation -points. Pthreads-win32 is not integrated enough with the C +points. PThreads4W is not integrated enough with the C library to implement this, and thus none of the C library functions is a cancellation point.

                                              diff --git a/manual/pthread_setconcurrency.html b/manual/pthread_setconcurrency.html index f9dd9efc..cb18405e 100644 --- a/manual/pthread_setconcurrency.html +++ b/manual/pthread_setconcurrency.html @@ -5,7 +5,7 @@ PTHREAD_SETCONCURRENCY(3) manual page -

                                              POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                              +

                                              POSIX Threads for Windows – REFERENCE - Pthreads4W

                                              Reference Index

                                              Table of Contents

                                              Name

                                              @@ -53,7 +53,7 @@

                                              Description

                                              is called so that a subsequent call to pthread_getconcurrency shall return the same value.

                                              -

                                              Pthreads-w32 provides these routines for source code +

                                              PThreads4W provides these routines for source code compatibility only, as described in the previous paragraph.

                                              Return Value

                                              If successful, the pthread_setconcurrency function shall @@ -115,7 +115,7 @@

                                              Copyright

                                              can be obtained online at http://www.opengroup.org/unix/online.html .

                                              -

                                              Modified by Ross Johnson for use with Pthreads-w32.

                                              +

                                              Modified by Ross Johnson for use with Pthreads4W.


                                              Table of Contents

                                                diff --git a/manual/pthread_setname_np.html b/manual/pthread_setname_np.html index 2b12a8a1..5e4e8b13 100644 --- a/manual/pthread_setname_np.html +++ b/manual/pthread_setname_np.html @@ -23,7 +23,7 @@

                                                POSIX -Threads for Windows – REFERENCE - Pthreads-w32

                                                +Threads for Windows – REFERENCE - PThreads4W

                                                Reference Index

                                                Table of Contents

                                                Name

                                                diff --git a/manual/pthread_setschedparam.html b/manual/pthread_setschedparam.html index aa755e9a..6fe6d608 100644 --- a/manual/pthread_setschedparam.html +++ b/manual/pthread_setschedparam.html @@ -5,7 +5,7 @@ PTHREAD_SETSCHEDPARAM(3) manual page -

                                                POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                                +

                                                POSIX Threads for Windows – REFERENCE - Pthreads4W

                                                Reference Index

                                                Table of Contents

                                                Name

                                                @@ -31,7 +31,7 @@

                                                Description

                                                round-robin) or SCHED_FIFO (real-time, first-in first-out). param specifies the scheduling priority for the two real-time policies.

                                                -

                                                Pthreads-w32 only supports SCHED_OTHER and does not support +

                                                PThreads4W only supports SCHED_OTHER and does not support the real-time scheduling policies SCHED_RR and SCHED_FIFO.

                                                pthread_getschedparam retrieves the scheduling policy and @@ -76,7 +76,7 @@

                                                Author

                                                Xavier Leroy <Xavier.Leroy@inria.fr>

                                                -

                                                Modified by Ross Johnson for use with Pthreads-w32.

                                                +

                                                Modified by Ross Johnson for use with Pthreads4W.

                                                See Also

                                                sched_setscheduler(2) , sched_getscheduler(2) diff --git a/manual/pthread_spin_init.html b/manual/pthread_spin_init.html index 8361ce52..2287ec17 100644 --- a/manual/pthread_spin_init.html +++ b/manual/pthread_spin_init.html @@ -5,7 +5,7 @@ PTHREAD_SPIN_INIT(3) manual page -

                                                POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                                +

                                                POSIX Threads for Windows – REFERENCE - Pthreads4W

                                                Reference Index

                                                Table of Contents

                                                Name

                                                @@ -34,7 +34,7 @@

                                                Description

                                                required to use the spin lock referenced by lock and initialize the lock to an unlocked state.

                                                -

                                                Pthreads-w32 supports single and multiple processor systems +

                                                PThreads4W supports single and multiple processor systems as well as process CPU affinity masking by checking the mask when the spin lock is initialized. If the process is using only a single processor at the time pthread_spin_init is called then the @@ -44,7 +44,7 @@

                                                Description

                                                mask is altered after the spin lock has been initialised, the spin lock is not modified, and may no longer be optimal for the number of CPUs available.

                                                -

                                                Pthreads-w32 defines _POSIX_THREAD_PROCESS_SHARED in +

                                                PThreads4W defines _POSIX_THREAD_PROCESS_SHARED in pthread.h as -1 to indicate that these routines do not support the PTHREAD_PROCESS_SHARED attribute. pthread_spin_init will return the error ENOTSUP if the value of pshared @@ -65,7 +65,7 @@

                                                Description

                                                or pthread_spin_unlock(3) is undefined.

                                                -

                                                Pthreads-w32 supports statically initialized spin locks +

                                                PThreads4W supports statically initialized spin locks using PTHREAD_SPINLOCK_INITIALIZER. An application should still call pthread_spin_destroy at some point to ensure that any resources consumed by the spin lock are released.

                                                @@ -136,7 +136,7 @@

                                                Copyright

                                                can be obtained online at http://www.opengroup.org/unix/online.html .

                                                -

                                                Modified by Ross Johnson for use with Pthreads-w32.

                                                +

                                                Modified by Ross Johnson for use with Pthreads4W.


                                                Table of Contents

                                                  diff --git a/manual/pthread_spin_lock.html b/manual/pthread_spin_lock.html index 53ab32aa..e33b6bf2 100644 --- a/manual/pthread_spin_lock.html +++ b/manual/pthread_spin_lock.html @@ -5,7 +5,7 @@ PTHREAD_SPIN_LOCK(3) manual page -

                                                  POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                                  +

                                                  POSIX Threads for Windows – REFERENCE - Pthreads4W

                                                  Reference Index

                                                  Table of Contents

                                                  Name

                                                  @@ -26,7 +26,7 @@

                                                  Description

                                                  (that is, shall not return from the pthread_spin_lock call) until the lock becomes available. The results are undefined if the calling thread holds the lock at the time the call is made.

                                                  -

                                                  Pthreads-w32 supports single and multiple processor systems +

                                                  PThreads4W supports single and multiple processor systems as well as process CPU affinity masking by checking the mask when the spin lock is initialized. If the process is using only a single processor at the time pthread_spin_init(3) @@ -101,7 +101,7 @@

                                                  Copyright

                                                  can be obtained online at http://www.opengroup.org/unix/online.html .

                                                  -

                                                  Modified by Ross Johnson for use with Pthreads-w32.

                                                  +

                                                  Modified by Ross Johnson for use with Pthreads4W.


                                                  Table of Contents

                                                    diff --git a/manual/pthread_spin_unlock.html b/manual/pthread_spin_unlock.html index 7f2b072f..19d66bf5 100644 --- a/manual/pthread_spin_unlock.html +++ b/manual/pthread_spin_unlock.html @@ -5,7 +5,7 @@ PTHREAD_SPIN_UNLOCK(3) manual page -

                                                    POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                                    +

                                                    POSIX Threads for Windows – REFERENCE - Pthreads4W

                                                    Reference Index

                                                    Table of Contents

                                                    Name

                                                    @@ -27,7 +27,7 @@

                                                    Description

                                                    pthread_spin_unlock is called, the lock becomes available and an unspecified spinning thread shall acquire the lock.

                                                    -

                                                    Pthreads-w32 does not check ownership of the lock and it is +

                                                    PThreads4W does not check ownership of the lock and it is therefore possible for a thread other than the locker to unlock the spin lock. This is not a feature that should be exploited.

                                                    The results are undefined if this function is called with an @@ -57,7 +57,7 @@

                                                    Examples

                                                    None.

                                                    Application Usage

                                                    -

                                                    Pthreads-w32 does not check ownership of the lock and it is +

                                                    PThreads4W does not check ownership of the lock and it is therefore possible for a thread other than the locker to unlock the spin lock. This is not a feature that should be exploited.

                                                    Rationale

                                                    @@ -84,7 +84,7 @@

                                                    Copyright

                                                    can be obtained online at http://www.opengroup.org/unix/online.html .

                                                    -

                                                    Modified by Ross Johnson for use with Pthreads-w32.

                                                    +

                                                    Modified by Ross Johnson for use with Pthreads4W.


                                                    Table of Contents

                                                      diff --git a/manual/pthread_timechange_handler_np.html b/manual/pthread_timechange_handler_np.html index 872f0500..15098266 100644 --- a/manual/pthread_timechange_handler_np.html +++ b/manual/pthread_timechange_handler_np.html @@ -5,7 +5,7 @@ PTHREAD_TIMECHANGE_HANDLER_NP(3) manual page -

                                                      POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                                      +

                                                      POSIX Threads for Windows – REFERENCE - Pthreads4W

                                                      Reference Index

                                                      Table of Contents

                                                      Name

                                                      @@ -47,7 +47,7 @@

                                                      Errors

                                                      To indicate that not all condition variables were signalled for some reason.

                                                      Author

                                                      -

                                                      Ross Johnson for use with Pthreads-w32.

                                                      +

                                                      Ross Johnson for use with Pthreads4W.


                                                      Table of Contents

                                                        diff --git a/manual/pthread_win32_attach_detach_np.html b/manual/pthread_win32_attach_detach_np.html index 7f5090e6..b0429680 100644 --- a/manual/pthread_win32_attach_detach_np.html +++ b/manual/pthread_win32_attach_detach_np.html @@ -5,14 +5,14 @@ PTHREAD_WIN32_ATTACH_DETACH_NP(3) manual page -

                                                        POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                                        +

                                                        POSIX Threads for Windows – REFERENCE - Pthreads4W

                                                        Reference Index

                                                        Table of Contents

                                                        Name

                                                        pthread_win32_process_attach_np, pthread_win32_process_detach_np, pthread_win32_thread_attach_np, pthread_win32_thread_detach_np – exposed versions of the -pthreads-w32 DLL dllMain() switch functionality for use when +PThreads4W DLL dllMain() switch functionality for use when statically linking the library.

                                                        Synopsis

                                                        #include <pthread.h> @@ -36,7 +36,7 @@

                                                        Description

                                                        thread exits.

                                                        These functions invariably return TRUE except for pthread_win32_process_attach_np which will return FALSE if -pthreads-w32 initialisation fails.

                                                        +PThreads4W initialisation fails.

                                                        Cancellation

                                                        None.

                                                        Return Value

                                                        @@ -45,7 +45,7 @@

                                                        Return ValueErrors

                                                        None.

                                                        Author

                                                        -

                                                        Ross Johnson for use with Pthreads-w32.

                                                        +

                                                        Ross Johnson for use with Pthreads4W.


                                                        Table of Contents

                                                          diff --git a/manual/pthread_win32_getabstime_np.html b/manual/pthread_win32_getabstime_np.html index f2fe03d2..7e4e060f 100644 --- a/manual/pthread_win32_getabstime_np.html +++ b/manual/pthread_win32_getabstime_np.html @@ -18,7 +18,7 @@

                                                          POSIX Threads for Windows – REFERENCE - -Pthreads-w32

                                                          +Pthreads4W

                                                          Reference Index

                                                          Table of Contents

                                                          Name

                                                          @@ -47,7 +47,7 @@

                                                          Return

                                                          Errors

                                                          None.

                                                          Author

                                                          -

                                                          Ross Johnson for use with Pthreads-w32.

                                                          +

                                                          Ross Johnson for use with Pthreads4W.


                                                          Table of Contents

                                                            diff --git a/manual/pthread_win32_test_features_np.html b/manual/pthread_win32_test_features_np.html index 3ce0c047..927942c5 100644 --- a/manual/pthread_win32_test_features_np.html +++ b/manual/pthread_win32_test_features_np.html @@ -5,7 +5,7 @@ PTHREAD_WIN32_TEST_FEATURES_NP(3) manual page -

                                                            POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                                            +

                                                            POSIX Threads for Windows – REFERENCE - Pthreads4W

                                                            Reference Index

                                                            Table of Contents

                                                            Name

                                                            @@ -39,7 +39,7 @@

                                                            Return ValueErrors

                                                            None.

                                                            Author

                                                            -

                                                            Ross Johnson for use with Pthreads-w32.

                                                            +

                                                            Ross Johnson for use with Pthreads4W.


                                                            Table of Contents

                                                              diff --git a/manual/sched_get_priority_max.html b/manual/sched_get_priority_max.html index 50c90d44..72311d9e 100644 --- a/manual/sched_get_priority_max.html +++ b/manual/sched_get_priority_max.html @@ -5,7 +5,7 @@ SCHED_GET_PRIORITY_MAX(3) manual page -

                                                              POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                                              +

                                                              POSIX Threads for Windows – REFERENCE - Pthreads4W

                                                              Reference Index

                                                              Table of Contents

                                                              Name

                                                              @@ -75,7 +75,7 @@

                                                              Copyright

                                                              can be obtained online at http://www.opengroup.org/unix/online.html .

                                                              -

                                                              Modified by Ross Johnson for use with Pthreads-w32.

                                                              +

                                                              Modified by Ross Johnson for use with Pthreads4W.


                                                              Table of Contents

                                                                diff --git a/manual/sched_getscheduler.html b/manual/sched_getscheduler.html index 9b7594e7..9acd5e76 100644 --- a/manual/sched_getscheduler.html +++ b/manual/sched_getscheduler.html @@ -5,7 +5,7 @@ SCHED_GETSCHEDULER(3) manual page -

                                                                POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                                                +

                                                                POSIX Threads for Windows – REFERENCE - Pthreads4W

                                                                Reference Index

                                                                Table of Contents

                                                                Name

                                                                @@ -25,7 +25,7 @@

                                                                Description

                                                                The values that can be returned by sched_getscheduler are defined in the <sched.h> header.

                                                                -

                                                                Pthreads-w32 only supports the SCHED_OTHER policy, +

                                                                PThreads4W only supports the SCHED_OTHER policy, which is the only value that can be returned. However, checks on pid and permissions are performed first so that the other useful side effects of this routine are retained.

                                                                @@ -87,7 +87,7 @@

                                                                Copyright

                                                                can be obtained online at http://www.opengroup.org/unix/online.html .

                                                                -

                                                                Modified by Ross Johnson for use with Pthreads-w32.

                                                                +

                                                                Modified by Ross Johnson for use with Pthreads4W.


                                                                Table of Contents

                                                                  diff --git a/manual/sched_setaffinity.html b/manual/sched_setaffinity.html index f5ebbf5f..279e4b01 100644 --- a/manual/sched_setaffinity.html +++ b/manual/sched_setaffinity.html @@ -13,7 +13,7 @@

                                                                  POSIX -Threads for Windows – REFERENCE - Pthreads-w32

                                                                  +Threads for Windows – REFERENCE - Pthreads4W

                                                          Reference Index

                                                          Table of Contents

                                                          Name

                                                          @@ -46,7 +46,7 @@

                                                          Description

                                                          mask. The cpusetsize argument specifies the size (in bytes) of mask. If pid is zero, then the mask of the calling process is returned.

                                                          -

                                                          Pthreads-w32 currently ignores the cpusetsize +

                                                          PThreads4W currently ignores the cpusetsize parameter for either function because cpu_set_t is a direct typeset to the Windows affinity vector type DWORD_PTR.

                                                          Windows may require that the requesting process have permission to @@ -112,7 +112,7 @@

                                                          See Also

                                                          pthread_getaffinity_np(3)

                                                          Copyright

                                                          Most of this is taken from the Linux manual page.

                                                          -

                                                          Modified by Ross Johnson for use with Pthreads-w32.

                                                          +

                                                          Modified by Ross Johnson for use with PThreads4W.


                                                          Table of Contents

                                                            diff --git a/manual/sched_setscheduler.html b/manual/sched_setscheduler.html index 10c19b66..988287f2 100644 --- a/manual/sched_setscheduler.html +++ b/manual/sched_setscheduler.html @@ -5,7 +5,7 @@ SCHED_SETSCHEDULER(3) manual page -

                                                            POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                                            +

                                                            POSIX Threads for Windows – REFERENCE - Pthreads4W

                                                            Reference Index

                                                            Table of Contents

                                                            Name

                                                            @@ -32,7 +32,7 @@

                                                            Description

                                                            The possible values for the policy parameter are defined in the <sched.h> header.

                                                            -

                                                            Pthreads-w32 only supports the SCHED_OTHER policy. +

                                                            PThreads4W only supports the SCHED_OTHER policy. Any other value for policy will return failure with errno set to ENOSYS. However, checks on pid and permissions are performed first so that the other useful side effects of this routine @@ -141,7 +141,7 @@

                                                            Copyright

                                                            can be obtained online at http://www.opengroup.org/unix/online.html .

                                                            -

                                                            Modified by Ross Johnson for use with Pthreads-w32.

                                                            +

                                                            Modified by Ross Johnson for use with Pthreads4W.


                                                            Table of Contents

                                                              diff --git a/manual/sched_yield.html b/manual/sched_yield.html index 75b95d9c..1eed9151 100644 --- a/manual/sched_yield.html +++ b/manual/sched_yield.html @@ -5,7 +5,7 @@ SCHED_YIELD(3) manual page -

                                                              POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                                              +

                                                              POSIX Threads for Windows – REFERENCE - Pthreads4W

                                                              Reference Index

                                                              Table of Contents

                                                              Name

                                                              diff --git a/manual/sem_init.html b/manual/sem_init.html index 61d82f18..a856b45d 100644 --- a/manual/sem_init.html +++ b/manual/sem_init.html @@ -5,7 +5,7 @@ SEM_INIT(3) manual page -

                                                              POSIX Threads for Windows – REFERENCE - Pthreads-w32

                                                              +

                                                              POSIX Threads for Windows – REFERENCE - Pthreads4W

                                                              Reference Index

                                                              Table of Contents

                                                              Name

                                                              @@ -45,7 +45,7 @@

                                                              Description

                                                              semaphore is local to the current process ( pshared is zero) or is to be shared between several processes ( pshared is not zero).

                                                              -

                                                              Pthreads-w32 currently does not support process-shared +

                                                              PThreads4W currently does not support process-shared semaphores, thus sem_init always returns with error EPERM if pshared is not zero.

                                                              @@ -74,7 +74,7 @@

                                                              Description

                                                              waiters are released and sem's count is incremented by number minus n.

                                                              sem_getvalue stores in the location pointed to by sval -the current count of the semaphore sem. In the Pthreads-w32 +the current count of the semaphore sem. In the PThreads4W implementation: if the value returned in sval is greater than or equal to 0 it was the sem's count at some point during the call to sem_getvalue. If the value returned in sval is @@ -161,7 +161,7 @@

                                                              Author

                                                              Xavier Leroy <Xavier.Leroy@inria.fr>

                                                              -

                                                              Modified by Ross Johnson for use with Pthreads-w32.

                                                              +

                                                              Modified by Ross Johnson for use with Pthreads4W.

                                                              See Also

                                                              pthread_mutex_init(3) , pthread_cond_init(3) , diff --git a/pthread.c b/pthread.c index 775988f6..515adedd 100644 --- a/pthread.c +++ b/pthread.c @@ -8,33 +8,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread.h b/pthread.h index 6cee1930..75e8b501 100644 --- a/pthread.h +++ b/pthread.h @@ -2,33 +2,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #if !defined( PTHREAD_H ) @@ -167,7 +164,7 @@ * The source code and other information about this library * are available from * - * http://sources.redhat.com/pthreads-win32/ + * https://sourceforge.net/projects/pthreads4w/ * * ------------------------------------------------------------- */ diff --git a/pthread_attr_destroy.c b/pthread_attr_destroy.c index 44373c8f..65b190b7 100644 --- a/pthread_attr_destroy.c +++ b/pthread_attr_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getaffinity_np.c b/pthread_attr_getaffinity_np.c index ae121d76..2227bca3 100644 --- a/pthread_attr_getaffinity_np.c +++ b/pthread_attr_getaffinity_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getdetachstate.c b/pthread_attr_getdetachstate.c index 2584848b..6c90f3b7 100644 --- a/pthread_attr_getdetachstate.c +++ b/pthread_attr_getdetachstate.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getinheritsched.c b/pthread_attr_getinheritsched.c index 443c80fd..a97326b9 100644 --- a/pthread_attr_getinheritsched.c +++ b/pthread_attr_getinheritsched.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getname_np.c b/pthread_attr_getname_np.c index b21c3326..b083de66 100644 --- a/pthread_attr_getname_np.c +++ b/pthread_attr_getname_np.c @@ -1,54 +1,51 @@ -/* - * pthread_attr_getname_np.c - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "pthread.h" -#include "implement.h" - -int -pthread_attr_getname_np(pthread_attr_t * attr, char *name, int len) -{ - //strncpy_s(name, len - 1, (*attr)->thrname, len - 1); -#if defined(_MSVCRT_) -# pragma warning(suppress:4996) - strncpy(name, (*attr)->thrname, len - 1); - (*attr)->thrname[len - 1] = '\0'; -#endif - - return 0; -} +/* + * pthread_attr_getname_np.c + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "pthread.h" +#include "implement.h" + +int +pthread_attr_getname_np(pthread_attr_t * attr, char *name, int len) +{ + //strncpy_s(name, len - 1, (*attr)->thrname, len - 1); +#if defined(_MSVCRT_) +# pragma warning(suppress:4996) + strncpy(name, (*attr)->thrname, len - 1); + (*attr)->thrname[len - 1] = '\0'; +#endif + + return 0; +} diff --git a/pthread_attr_getschedparam.c b/pthread_attr_getschedparam.c index 7251acf8..79228957 100644 --- a/pthread_attr_getschedparam.c +++ b/pthread_attr_getschedparam.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getschedpolicy.c b/pthread_attr_getschedpolicy.c index c08e74ee..996e63d6 100644 --- a/pthread_attr_getschedpolicy.c +++ b/pthread_attr_getschedpolicy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getscope.c b/pthread_attr_getscope.c index c5c5f064..cdccd785 100644 --- a/pthread_attr_getscope.c +++ b/pthread_attr_getscope.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getstackaddr.c b/pthread_attr_getstackaddr.c index 90fd0700..0d5c1322 100644 --- a/pthread_attr_getstackaddr.c +++ b/pthread_attr_getstackaddr.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_getstacksize.c b/pthread_attr_getstacksize.c index 1735b419..738146fc 100644 --- a/pthread_attr_getstacksize.c +++ b/pthread_attr_getstacksize.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_init.c b/pthread_attr_init.c index 9e8c4d4a..e1040df7 100644 --- a/pthread_attr_init.c +++ b/pthread_attr_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setaffinity_np.c b/pthread_attr_setaffinity_np.c index a1091907..62ea7b97 100644 --- a/pthread_attr_setaffinity_np.c +++ b/pthread_attr_setaffinity_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setdetachstate.c b/pthread_attr_setdetachstate.c index 2f7c5e22..07c18f51 100644 --- a/pthread_attr_setdetachstate.c +++ b/pthread_attr_setdetachstate.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setinheritsched.c b/pthread_attr_setinheritsched.c index db67f6d6..d02033bc 100644 --- a/pthread_attr_setinheritsched.c +++ b/pthread_attr_setinheritsched.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setname_np.c b/pthread_attr_setname_np.c index f34b8075..a8d2ce2b 100644 --- a/pthread_attr_setname_np.c +++ b/pthread_attr_setname_np.c @@ -1,99 +1,96 @@ -/* - * pthread_attr_setname_np.c - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include "pthread.h" -#include "implement.h" - -#if defined (__PTW32_COMPATIBILITY_BSD) || defined (__PTW32_COMPATIBILITY_TRU64) -int -pthread_attr_setname_np(pthread_attr_t * attr, const char *name, void *arg) -{ - int len; - int result; - char tmpbuf[PTHREAD_MAX_NAMELEN_NP]; - char * newname; - char * oldname; - - /* - * According to the MSDN description for snprintf() - * where count is the second parameter: - * If len < count, then len characters are stored in buffer, a null-terminator is appended, and len is returned. - * If len = count, then len characters are stored in buffer, no null-terminator is appended, and len is returned. - * If len > count, then count characters are stored in buffer, no null-terminator is appended, and a negative value is returned. - * - * This is different to the POSIX behaviour which returns the number of characters that would have been written in all cases. - */ - len = snprintf(tmpbuf, PTHREAD_MAX_NAMELEN_NP-1, name, arg); - tmpbuf[PTHREAD_MAX_NAMELEN_NP-1] = '\0'; - if (len < 0) - { - return EINVAL; - } - - newname = _strdup(tmpbuf); - - oldname = (*attr)->thrname; - (*attr)->thrname = newname; - if (oldname) - { - free(oldname); - } - - return 0; -} -#else -int -pthread_attr_setname_np(pthread_attr_t * attr, const char *name) -{ - char * newname; - char * oldname; - - newname = _strdup(name); - - oldname = (*attr)->thrname; - (*attr)->thrname = newname; - if (oldname) - { - free(oldname); - } - - return 0; -} -#endif +/* + * pthread_attr_setname_np.c + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include "pthread.h" +#include "implement.h" + +#if defined (__PTW32_COMPATIBILITY_BSD) || defined (__PTW32_COMPATIBILITY_TRU64) +int +pthread_attr_setname_np(pthread_attr_t * attr, const char *name, void *arg) +{ + int len; + int result; + char tmpbuf[PTHREAD_MAX_NAMELEN_NP]; + char * newname; + char * oldname; + + /* + * According to the MSDN description for snprintf() + * where count is the second parameter: + * If len < count, then len characters are stored in buffer, a null-terminator is appended, and len is returned. + * If len = count, then len characters are stored in buffer, no null-terminator is appended, and len is returned. + * If len > count, then count characters are stored in buffer, no null-terminator is appended, and a negative value is returned. + * + * This is different to the POSIX behaviour which returns the number of characters that would have been written in all cases. + */ + len = snprintf(tmpbuf, PTHREAD_MAX_NAMELEN_NP-1, name, arg); + tmpbuf[PTHREAD_MAX_NAMELEN_NP-1] = '\0'; + if (len < 0) + { + return EINVAL; + } + + newname = _strdup(tmpbuf); + + oldname = (*attr)->thrname; + (*attr)->thrname = newname; + if (oldname) + { + free(oldname); + } + + return 0; +} +#else +int +pthread_attr_setname_np(pthread_attr_t * attr, const char *name) +{ + char * newname; + char * oldname; + + newname = _strdup(name); + + oldname = (*attr)->thrname; + (*attr)->thrname = newname; + if (oldname) + { + free(oldname); + } + + return 0; +} +#endif diff --git a/pthread_attr_setschedparam.c b/pthread_attr_setschedparam.c index 1472f2df..c1362c6a 100644 --- a/pthread_attr_setschedparam.c +++ b/pthread_attr_setschedparam.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setschedpolicy.c b/pthread_attr_setschedpolicy.c index 331be677..f3857f2e 100644 --- a/pthread_attr_setschedpolicy.c +++ b/pthread_attr_setschedpolicy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setscope.c b/pthread_attr_setscope.c index 96bc4941..68f8178f 100644 --- a/pthread_attr_setscope.c +++ b/pthread_attr_setscope.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setstackaddr.c b/pthread_attr_setstackaddr.c index 2a1b90e5..f44b758f 100644 --- a/pthread_attr_setstackaddr.c +++ b/pthread_attr_setstackaddr.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_attr_setstacksize.c b/pthread_attr_setstacksize.c index 8143db50..33179944 100644 --- a/pthread_attr_setstacksize.c +++ b/pthread_attr_setstacksize.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrier_destroy.c b/pthread_barrier_destroy.c index 8f59c49f..69a0d372 100644 --- a/pthread_barrier_destroy.c +++ b/pthread_barrier_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrier_init.c b/pthread_barrier_init.c index bc76fcd7..8434b23f 100644 --- a/pthread_barrier_init.c +++ b/pthread_barrier_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrier_wait.c b/pthread_barrier_wait.c index acbdc260..5038aa04 100644 --- a/pthread_barrier_wait.c +++ b/pthread_barrier_wait.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_destroy.c b/pthread_barrierattr_destroy.c index d8953a9b..57285791 100644 --- a/pthread_barrierattr_destroy.c +++ b/pthread_barrierattr_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_getpshared.c b/pthread_barrierattr_getpshared.c index 7d9736c0..9600d85b 100644 --- a/pthread_barrierattr_getpshared.c +++ b/pthread_barrierattr_getpshared.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_init.c b/pthread_barrierattr_init.c index aef72b4f..1ae348c1 100644 --- a/pthread_barrierattr_init.c +++ b/pthread_barrierattr_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_barrierattr_setpshared.c b/pthread_barrierattr_setpshared.c index 7f5dc549..30909b3b 100644 --- a/pthread_barrierattr_setpshared.c +++ b/pthread_barrierattr_setpshared.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_cancel.c b/pthread_cancel.c index fb4b1b7f..e3047857 100644 --- a/pthread_cancel.c +++ b/pthread_cancel.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_cond_destroy.c b/pthread_cond_destroy.c index 803ee61f..acfeb523 100644 --- a/pthread_cond_destroy.c +++ b/pthread_cond_destroy.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_cond_init.c b/pthread_cond_init.c index 3522be1c..f8e92702 100644 --- a/pthread_cond_init.c +++ b/pthread_cond_init.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_cond_signal.c b/pthread_cond_signal.c index 31119fd1..b5186d00 100644 --- a/pthread_cond_signal.c +++ b/pthread_cond_signal.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * ------------------------------------------------------------- * Algorithm: diff --git a/pthread_cond_wait.c b/pthread_cond_wait.c index c6a13137..58909acc 100644 --- a/pthread_cond_wait.c +++ b/pthread_cond_wait.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * ------------------------------------------------------------- * Algorithm: diff --git a/pthread_condattr_destroy.c b/pthread_condattr_destroy.c index 696065ef..e2d4075e 100644 --- a/pthread_condattr_destroy.c +++ b/pthread_condattr_destroy.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_condattr_getpshared.c b/pthread_condattr_getpshared.c index dc161a9d..643d482f 100644 --- a/pthread_condattr_getpshared.c +++ b/pthread_condattr_getpshared.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_condattr_init.c b/pthread_condattr_init.c index aa32cc6d..7e21d892 100644 --- a/pthread_condattr_init.c +++ b/pthread_condattr_init.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_condattr_setpshared.c b/pthread_condattr_setpshared.c index 977b5a5c..ebff18b1 100644 --- a/pthread_condattr_setpshared.c +++ b/pthread_condattr_setpshared.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_delay_np.c b/pthread_delay_np.c index fad51ca2..a43d8a5b 100644 --- a/pthread_delay_np.c +++ b/pthread_delay_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_detach.c b/pthread_detach.c index 63289b1f..6933d469 100644 --- a/pthread_detach.c +++ b/pthread_detach.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_equal.c b/pthread_equal.c index 48da7e20..712d43b5 100644 --- a/pthread_equal.c +++ b/pthread_equal.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_exit.c b/pthread_exit.c index a8a68ada..f98230a7 100644 --- a/pthread_exit.c +++ b/pthread_exit.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getconcurrency.c b/pthread_getconcurrency.c index 1e957968..c848115e 100644 --- a/pthread_getconcurrency.c +++ b/pthread_getconcurrency.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getname_np.c b/pthread_getname_np.c index 97e8f88e..84e729c1 100644 --- a/pthread_getname_np.c +++ b/pthread_getname_np.c @@ -3,33 +3,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getschedparam.c b/pthread_getschedparam.c index 0afefd5f..dd3cc3df 100644 --- a/pthread_getschedparam.c +++ b/pthread_getschedparam.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getspecific.c b/pthread_getspecific.c index 77caa6b1..4173e2fc 100644 --- a/pthread_getspecific.c +++ b/pthread_getspecific.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getunique_np.c b/pthread_getunique_np.c index 6a7eb409..1ae84061 100755 --- a/pthread_getunique_np.c +++ b/pthread_getunique_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_getw32threadhandle_np.c b/pthread_getw32threadhandle_np.c index 2de0d13c..8678ac46 100644 --- a/pthread_getw32threadhandle_np.c +++ b/pthread_getw32threadhandle_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_join.c b/pthread_join.c index f7a0760d..b317bef0 100644 --- a/pthread_join.c +++ b/pthread_join.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_key_create.c b/pthread_key_create.c index 9d167568..2468c098 100644 --- a/pthread_key_create.c +++ b/pthread_key_create.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_key_delete.c b/pthread_key_delete.c index b32eea26..b983e282 100644 --- a/pthread_key_delete.c +++ b/pthread_key_delete.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_kill.c b/pthread_kill.c index 860d0558..b838352e 100644 --- a/pthread_kill.c +++ b/pthread_kill.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_consistent.c b/pthread_mutex_consistent.c index 52660949..dd64d7d9 100755 --- a/pthread_mutex_consistent.c +++ b/pthread_mutex_consistent.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_destroy.c b/pthread_mutex_destroy.c index 99e2a761..c1b8b757 100644 --- a/pthread_mutex_destroy.c +++ b/pthread_mutex_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_init.c b/pthread_mutex_init.c index 69346f04..514df06c 100644 --- a/pthread_mutex_init.c +++ b/pthread_mutex_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutex_lock.c b/pthread_mutex_lock.c index 17a9ce0e..1e4c1774 100644 --- a/pthread_mutex_lock.c +++ b/pthread_mutex_lock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H @@ -48,14 +45,14 @@ int pthread_mutex_lock (pthread_mutex_t * mutex) { - int kind; - pthread_mutex_t mx; - int result = 0; - /* * Let the system deal with invalid pointers. */ - if (*mutex == NULL) + pthread_mutex_t mx = *mutex; + int kind; + int result = 0; + + if (mx == NULL) { return EINVAL; } @@ -66,15 +63,15 @@ pthread_mutex_lock (pthread_mutex_t * mutex) * again inside the guarded section of __ptw32_mutex_check_need_init() * to avoid race conditions. */ - if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) + if (mx >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) { if ((result = __ptw32_mutex_check_need_init (mutex)) != 0) { return (result); } + mx = *mutex; } - mx = *mutex; kind = mx->kind; if (kind >= 0) diff --git a/pthread_mutex_timedlock.c b/pthread_mutex_timedlock.c index 72cb16ba..60a813c0 100644 --- a/pthread_mutex_timedlock.c +++ b/pthread_mutex_timedlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H @@ -113,13 +110,17 @@ int pthread_mutex_timedlock (pthread_mutex_t * mutex, const struct timespec *abstime) { - pthread_mutex_t mx; - int kind; - int result = 0; - /* * Let the system deal with invalid pointers. */ + pthread_mutex_t mx = *mutex; + int kind; + int result = 0; + + if (mx == NULL) + { + return EINVAL; + } /* * We do a quick check to see if we need to do more work @@ -127,15 +128,15 @@ pthread_mutex_timedlock (pthread_mutex_t * mutex, * again inside the guarded section of __ptw32_mutex_check_need_init() * to avoid race conditions. */ - if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) + if (mx >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) { if ((result = __ptw32_mutex_check_need_init (mutex)) != 0) { return (result); } + mx = *mutex; } - mx = *mutex; kind = mx->kind; if (kind >= 0) diff --git a/pthread_mutex_trylock.c b/pthread_mutex_trylock.c index 499185f9..8c98abd7 100644 --- a/pthread_mutex_trylock.c +++ b/pthread_mutex_trylock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H @@ -46,13 +43,17 @@ int pthread_mutex_trylock (pthread_mutex_t * mutex) { - pthread_mutex_t mx; - int kind; - int result = 0; - /* * Let the system deal with invalid pointers. */ + pthread_mutex_t mx = *mutex; + int kind; + int result = 0; + + if (mx == NULL) + { + return EINVAL; + } /* * We do a quick check to see if we need to do more work @@ -60,15 +61,15 @@ pthread_mutex_trylock (pthread_mutex_t * mutex) * again inside the guarded section of __ptw32_mutex_check_need_init() * to avoid race conditions. */ - if (*mutex >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) + if (mx >= PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) { if ((result = __ptw32_mutex_check_need_init (mutex)) != 0) { return (result); } + mx = *mutex; } - mx = *mutex; kind = mx->kind; if (kind >= 0) diff --git a/pthread_mutex_unlock.c b/pthread_mutex_unlock.c index 5c56447e..88bf241f 100644 --- a/pthread_mutex_unlock.c +++ b/pthread_mutex_unlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H @@ -46,22 +43,19 @@ int pthread_mutex_unlock (pthread_mutex_t * mutex) { - int result = 0; - int kind; - pthread_mutex_t mx; - /* * Let the system deal with invalid pointers. */ - - mx = *mutex; + pthread_mutex_t mx = *mutex; + int kind; + int result = 0; /* * If the thread calling us holds the mutex then there is no * race condition. If another thread holds the * lock then we shouldn't be in here. */ - if (mx < PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) + if (mx < PTHREAD_ERRORCHECK_MUTEX_INITIALIZER) // Remember, pointers are unsigned. { kind = mx->kind; @@ -173,6 +167,11 @@ pthread_mutex_unlock (pthread_mutex_t * mutex) } else if (mx != PTHREAD_MUTEX_INITIALIZER) { + /* + * If mx is PTHREAD_ERRORCHECK_MUTEX_INITIALIZER or PTHREAD_RECURSIVE_MUTEX_INITIALIZER + * we need to know we are doing something unexpected. For PTHREAD_MUTEX_INITIALIZER + * (normal) mutexes we can just silently ignore it. + */ result = EINVAL; } diff --git a/pthread_mutexattr_destroy.c b/pthread_mutexattr_destroy.c index ae8428cc..f384dc89 100644 --- a/pthread_mutexattr_destroy.c +++ b/pthread_mutexattr_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_getkind_np.c b/pthread_mutexattr_getkind_np.c index 13903b87..c91e0c2f 100644 --- a/pthread_mutexattr_getkind_np.c +++ b/pthread_mutexattr_getkind_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_getpshared.c b/pthread_mutexattr_getpshared.c index b285d2d2..599482ec 100644 --- a/pthread_mutexattr_getpshared.c +++ b/pthread_mutexattr_getpshared.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_getrobust.c b/pthread_mutexattr_getrobust.c index 28c28657..0a0f1864 100755 --- a/pthread_mutexattr_getrobust.c +++ b/pthread_mutexattr_getrobust.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_gettype.c b/pthread_mutexattr_gettype.c index a6e4cdb8..ed7c6512 100644 --- a/pthread_mutexattr_gettype.c +++ b/pthread_mutexattr_gettype.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_init.c b/pthread_mutexattr_init.c index 037b88b3..2a98555e 100644 --- a/pthread_mutexattr_init.c +++ b/pthread_mutexattr_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_setkind_np.c b/pthread_mutexattr_setkind_np.c index 3d55d821..29494454 100644 --- a/pthread_mutexattr_setkind_np.c +++ b/pthread_mutexattr_setkind_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_setpshared.c b/pthread_mutexattr_setpshared.c index 997f469a..50e556d4 100644 --- a/pthread_mutexattr_setpshared.c +++ b/pthread_mutexattr_setpshared.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_setrobust.c b/pthread_mutexattr_setrobust.c index 4f18b489..c2f00d9d 100755 --- a/pthread_mutexattr_setrobust.c +++ b/pthread_mutexattr_setrobust.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_mutexattr_settype.c b/pthread_mutexattr_settype.c index bb650eb4..d4def28a 100644 --- a/pthread_mutexattr_settype.c +++ b/pthread_mutexattr_settype.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_num_processors_np.c b/pthread_num_processors_np.c index b0da609e..f8201e0e 100644 --- a/pthread_num_processors_np.c +++ b/pthread_num_processors_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_once.c b/pthread_once.c index e48a4dcf..e9568f55 100644 --- a/pthread_once.c +++ b/pthread_once.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_destroy.c b/pthread_rwlock_destroy.c index 40fe5aad..672e6788 100644 --- a/pthread_rwlock_destroy.c +++ b/pthread_rwlock_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_init.c b/pthread_rwlock_init.c index cfcc1c00..bcf366cf 100644 --- a/pthread_rwlock_init.c +++ b/pthread_rwlock_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_rdlock.c b/pthread_rwlock_rdlock.c index dcebd672..22be6a23 100644 --- a/pthread_rwlock_rdlock.c +++ b/pthread_rwlock_rdlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_timedrdlock.c b/pthread_rwlock_timedrdlock.c index 8ef92231..90e43576 100644 --- a/pthread_rwlock_timedrdlock.c +++ b/pthread_rwlock_timedrdlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_timedwrlock.c b/pthread_rwlock_timedwrlock.c index cb7e4189..2d227921 100644 --- a/pthread_rwlock_timedwrlock.c +++ b/pthread_rwlock_timedwrlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_tryrdlock.c b/pthread_rwlock_tryrdlock.c index 6ff255c5..c1c6a498 100644 --- a/pthread_rwlock_tryrdlock.c +++ b/pthread_rwlock_tryrdlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_trywrlock.c b/pthread_rwlock_trywrlock.c index 676dedd8..5aedae07 100644 --- a/pthread_rwlock_trywrlock.c +++ b/pthread_rwlock_trywrlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_unlock.c b/pthread_rwlock_unlock.c index 2a02b7a7..22c6cfbb 100644 --- a/pthread_rwlock_unlock.c +++ b/pthread_rwlock_unlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlock_wrlock.c b/pthread_rwlock_wrlock.c index eafb01b5..d832867c 100644 --- a/pthread_rwlock_wrlock.c +++ b/pthread_rwlock_wrlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_destroy.c b/pthread_rwlockattr_destroy.c index e9e3407b..e55acd61 100644 --- a/pthread_rwlockattr_destroy.c +++ b/pthread_rwlockattr_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_getpshared.c b/pthread_rwlockattr_getpshared.c index 4de7d30e..b297ec34 100644 --- a/pthread_rwlockattr_getpshared.c +++ b/pthread_rwlockattr_getpshared.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_init.c b/pthread_rwlockattr_init.c index 994b7ec0..452bbf98 100644 --- a/pthread_rwlockattr_init.c +++ b/pthread_rwlockattr_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_rwlockattr_setpshared.c b/pthread_rwlockattr_setpshared.c index 0263c11f..d3bd618b 100644 --- a/pthread_rwlockattr_setpshared.c +++ b/pthread_rwlockattr_setpshared.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_self.c b/pthread_self.c index 6b960f16..bdfca470 100644 --- a/pthread_self.c +++ b/pthread_self.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setaffinity.c b/pthread_setaffinity.c index 79e70b5c..22e157dd 100644 --- a/pthread_setaffinity.c +++ b/pthread_setaffinity.c @@ -1,243 +1,240 @@ -/* - * pthread_setaffinity.c - * - * Description: - * This translation unit implements thread cpu affinity setting. - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "pthread.h" -#include "implement.h" - -int -pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, - const cpu_set_t *cpuset) - /* - * ------------------------------------------------------ - * DOCPUBLIC - * The pthread_setaffinity_np() function sets the CPU affinity mask - * of the thread thread to the CPU set pointed to by cpuset. If the - * call is successful, and the thread is not currently running on one - * of the CPUs in cpuset, then it is migrated to one of those CPUs. - * - * PARAMETERS - * thread - * The target thread - * - * cpusetsize - * Ignored in pthreads4w. - * Usually set to sizeof(cpu_set_t) - * - * cpuset - * The new cpu set mask. - * - * The set of CPUs on which the thread will actually run - * is the intersection of the set specified in the cpuset - * argument and the set of CPUs actually present for - * the process. - * - * DESCRIPTION - * The pthread_setaffinity_np() function sets the CPU affinity mask - * of the thread thread to the CPU set pointed to by cpuset. If the - * call is successful, and the thread is not currently running on one - * of the CPUs in cpuset, then it is migrated to one of those CPUs. - * - * RESULTS - * 0 Success - * ESRCH Thread does not exist - * EFAULT pcuset is NULL - * EAGAIN The thread affinity could not be set - * ENOSYS The platform does not support this function - * - * ------------------------------------------------------ - */ -{ -#if ! defined(HAVE_CPU_AFFINITY) - - return ENOSYS; - -#else - - int result = 0; - __ptw32_thread_t * tp; - __ptw32_mcs_local_node_t node; - cpu_set_t processCpuset; - - __ptw32_mcs_lock_acquire (&__ptw32_thread_reuse_lock, &node); - - tp = (__ptw32_thread_t *) thread.p; - - if (NULL == tp || thread.x != tp->ptHandle.x || NULL == tp->threadH) - { - result = ESRCH; - } - else - { - if (cpuset) - { - if (sched_getaffinity(0, sizeof(cpu_set_t), &processCpuset)) - { - result = __PTW32_GET_ERRNO(); - } - else - { - /* - * Result is the intersection of available CPUs and the mask. - */ - cpu_set_t newMask; - - CPU_AND(&newMask, &processCpuset, cpuset); - - if (((_sched_cpu_set_vector_*)&newMask)->_cpuset) - { - if (SetThreadAffinityMask (tp->threadH, ((_sched_cpu_set_vector_*)&newMask)->_cpuset)) - { - /* - * We record the intersection of the process affinity - * and the thread affinity cpusets so that - * pthread_getaffinity_np() returns the actual thread - * CPU set. - */ - tp->cpuset = ((_sched_cpu_set_vector_*)&newMask)->_cpuset; - } - else - { - result = EAGAIN; - } - } - else - { - result = EINVAL; - } - } - } - else - { - result = EFAULT; - } - } - - __ptw32_mcs_lock_release (&node); - - return result; - -#endif -} - -int -pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t *cpuset) - /* - * ------------------------------------------------------ - * DOCPUBLIC - * The pthread_getaffinity_np() function returns the CPU affinity mask - * of the thread thread in the CPU set pointed to by cpuset. - * - * PARAMETERS - * thread - * The target thread - * - * cpusetsize - * Ignored in pthreads4w. - * Usually set to sizeof(cpu_set_t) - * - * cpuset - * The location where the current cpu set - * will be returned. - * - * - * DESCRIPTION - * The pthread_getaffinity_np() function returns the CPU affinity mask - * of the thread thread in the CPU set pointed to by cpuset. - * - * RESULTS - * 0 Success - * ESRCH thread does not exist - * EFAULT cpuset is NULL - * ENOSYS The platform does not support this function - * - * ------------------------------------------------------ - */ -{ -#if ! defined(HAVE_CPU_AFFINITY) - - return ENOSYS; - -#else - - int result = 0; - __ptw32_thread_t * tp; - __ptw32_mcs_local_node_t node; - - __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); - - tp = (__ptw32_thread_t *) thread.p; - - if (NULL == tp || thread.x != tp->ptHandle.x || NULL == tp->threadH) - { - result = ESRCH; - } - else - { - if (cpuset) - { - if (tp->cpuset) - { - /* - * The application may have set thread affinity independently - * via SetThreadAffinityMask(). If so, we adjust our record of the threads - * affinity and try to do so in a reasonable way. - */ - DWORD_PTR vThreadMask = SetThreadAffinityMask(tp->threadH, tp->cpuset); - if (vThreadMask && vThreadMask != tp->cpuset) - { - (void) SetThreadAffinityMask(tp->threadH, vThreadMask); - tp->cpuset = vThreadMask; - } - } - ((_sched_cpu_set_vector_*)cpuset)->_cpuset = tp->cpuset; - } - else - { - result = EFAULT; - } - } - - __ptw32_mcs_lock_release(&node); - - return result; - -#endif -} +/* + * pthread_setaffinity.c + * + * Description: + * This translation unit implements thread cpu affinity setting. + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "pthread.h" +#include "implement.h" + +int +pthread_setaffinity_np (pthread_t thread, size_t cpusetsize, + const cpu_set_t *cpuset) + /* + * ------------------------------------------------------ + * DOCPUBLIC + * The pthread_setaffinity_np() function sets the CPU affinity mask + * of the thread thread to the CPU set pointed to by cpuset. If the + * call is successful, and the thread is not currently running on one + * of the CPUs in cpuset, then it is migrated to one of those CPUs. + * + * PARAMETERS + * thread + * The target thread + * + * cpusetsize + * Ignored in pthreads4w. + * Usually set to sizeof(cpu_set_t) + * + * cpuset + * The new cpu set mask. + * + * The set of CPUs on which the thread will actually run + * is the intersection of the set specified in the cpuset + * argument and the set of CPUs actually present for + * the process. + * + * DESCRIPTION + * The pthread_setaffinity_np() function sets the CPU affinity mask + * of the thread thread to the CPU set pointed to by cpuset. If the + * call is successful, and the thread is not currently running on one + * of the CPUs in cpuset, then it is migrated to one of those CPUs. + * + * RESULTS + * 0 Success + * ESRCH Thread does not exist + * EFAULT pcuset is NULL + * EAGAIN The thread affinity could not be set + * ENOSYS The platform does not support this function + * + * ------------------------------------------------------ + */ +{ +#if ! defined(HAVE_CPU_AFFINITY) + + return ENOSYS; + +#else + + int result = 0; + __ptw32_thread_t * tp; + __ptw32_mcs_local_node_t node; + cpu_set_t processCpuset; + + __ptw32_mcs_lock_acquire (&__ptw32_thread_reuse_lock, &node); + + tp = (__ptw32_thread_t *) thread.p; + + if (NULL == tp || thread.x != tp->ptHandle.x || NULL == tp->threadH) + { + result = ESRCH; + } + else + { + if (cpuset) + { + if (sched_getaffinity(0, sizeof(cpu_set_t), &processCpuset)) + { + result = __PTW32_GET_ERRNO(); + } + else + { + /* + * Result is the intersection of available CPUs and the mask. + */ + cpu_set_t newMask; + + CPU_AND(&newMask, &processCpuset, cpuset); + + if (((_sched_cpu_set_vector_*)&newMask)->_cpuset) + { + if (SetThreadAffinityMask (tp->threadH, ((_sched_cpu_set_vector_*)&newMask)->_cpuset)) + { + /* + * We record the intersection of the process affinity + * and the thread affinity cpusets so that + * pthread_getaffinity_np() returns the actual thread + * CPU set. + */ + tp->cpuset = ((_sched_cpu_set_vector_*)&newMask)->_cpuset; + } + else + { + result = EAGAIN; + } + } + else + { + result = EINVAL; + } + } + } + else + { + result = EFAULT; + } + } + + __ptw32_mcs_lock_release (&node); + + return result; + +#endif +} + +int +pthread_getaffinity_np (pthread_t thread, size_t cpusetsize, cpu_set_t *cpuset) + /* + * ------------------------------------------------------ + * DOCPUBLIC + * The pthread_getaffinity_np() function returns the CPU affinity mask + * of the thread thread in the CPU set pointed to by cpuset. + * + * PARAMETERS + * thread + * The target thread + * + * cpusetsize + * Ignored in pthreads4w. + * Usually set to sizeof(cpu_set_t) + * + * cpuset + * The location where the current cpu set + * will be returned. + * + * + * DESCRIPTION + * The pthread_getaffinity_np() function returns the CPU affinity mask + * of the thread thread in the CPU set pointed to by cpuset. + * + * RESULTS + * 0 Success + * ESRCH thread does not exist + * EFAULT cpuset is NULL + * ENOSYS The platform does not support this function + * + * ------------------------------------------------------ + */ +{ +#if ! defined(HAVE_CPU_AFFINITY) + + return ENOSYS; + +#else + + int result = 0; + __ptw32_thread_t * tp; + __ptw32_mcs_local_node_t node; + + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); + + tp = (__ptw32_thread_t *) thread.p; + + if (NULL == tp || thread.x != tp->ptHandle.x || NULL == tp->threadH) + { + result = ESRCH; + } + else + { + if (cpuset) + { + if (tp->cpuset) + { + /* + * The application may have set thread affinity independently + * via SetThreadAffinityMask(). If so, we adjust our record of the threads + * affinity and try to do so in a reasonable way. + */ + DWORD_PTR vThreadMask = SetThreadAffinityMask(tp->threadH, tp->cpuset); + if (vThreadMask && vThreadMask != tp->cpuset) + { + (void) SetThreadAffinityMask(tp->threadH, vThreadMask); + tp->cpuset = vThreadMask; + } + } + ((_sched_cpu_set_vector_*)cpuset)->_cpuset = tp->cpuset; + } + else + { + result = EFAULT; + } + } + + __ptw32_mcs_lock_release(&node); + + return result; + +#endif +} diff --git a/pthread_setcancelstate.c b/pthread_setcancelstate.c index 90eac87a..2e541a4c 100644 --- a/pthread_setcancelstate.c +++ b/pthread_setcancelstate.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setcanceltype.c b/pthread_setcanceltype.c index f201bc93..06189f87 100644 --- a/pthread_setcanceltype.c +++ b/pthread_setcanceltype.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setconcurrency.c b/pthread_setconcurrency.c index b47f6b5c..1c758040 100644 --- a/pthread_setconcurrency.c +++ b/pthread_setconcurrency.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setname_np.c b/pthread_setname_np.c index c3f3cd90..41759c9c 100644 --- a/pthread_setname_np.c +++ b/pthread_setname_np.c @@ -3,33 +3,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setschedparam.c b/pthread_setschedparam.c index 28598ab6..2cdfd4d1 100644 --- a/pthread_setschedparam.c +++ b/pthread_setschedparam.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_setspecific.c b/pthread_setspecific.c index f65985be..6894882b 100644 --- a/pthread_setspecific.c +++ b/pthread_setspecific.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_destroy.c b/pthread_spin_destroy.c index 81ddd453..d6edd31e 100644 --- a/pthread_spin_destroy.c +++ b/pthread_spin_destroy.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_init.c b/pthread_spin_init.c index bdf0effb..75e6eeef 100644 --- a/pthread_spin_init.c +++ b/pthread_spin_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_lock.c b/pthread_spin_lock.c index cc015d56..64ad0e31 100644 --- a/pthread_spin_lock.c +++ b/pthread_spin_lock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_trylock.c b/pthread_spin_trylock.c index bf4f2c31..d9fd7197 100644 --- a/pthread_spin_trylock.c +++ b/pthread_spin_trylock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_spin_unlock.c b/pthread_spin_unlock.c index 0f039abc..8d24d735 100644 --- a/pthread_spin_unlock.c +++ b/pthread_spin_unlock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_testcancel.c b/pthread_testcancel.c index cce05f2f..7a3ea69b 100644 --- a/pthread_testcancel.c +++ b/pthread_testcancel.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_timechange_handler_np.c b/pthread_timechange_handler_np.c index 943a928b..88bab108 100644 --- a/pthread_timechange_handler_np.c +++ b/pthread_timechange_handler_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/pthread_timedjoin_np.c b/pthread_timedjoin_np.c index 0eec13cb..6ae04a9d 100644 --- a/pthread_timedjoin_np.c +++ b/pthread_timedjoin_np.c @@ -1,188 +1,185 @@ -/* - * pthread_timedjoin_np.c - * - * Description: - * This translation unit implements functions related to thread - * synchronisation. - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "pthread.h" -#include "implement.h" - -/* - * Not needed yet, but defining it should indicate clashes with build target - * environment that should be fixed. - */ -#if !defined(WINCE) -# include -#endif - - -int -pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) - /* - * ------------------------------------------------------ - * DOCPUBLIC - * This function waits for 'thread' to terminate and - * returns the thread's exit value if 'value_ptr' is not - * NULL or until 'abstime' passes and returns an - * error. If 'abstime' is NULL then the function waits - * forever, i.e. reverts to pthread_join behaviour. - * This function detaches the thread on successful - * completion. - * - * PARAMETERS - * thread - * an instance of pthread_t - * - * value_ptr - * pointer to an instance of pointer to void - * - * abstime - * pointer to an instance of struct timespec - * representing an absolute time value - * - * - * DESCRIPTION - * This function waits for 'thread' to terminate and - * returns the thread's exit value if 'value_ptr' is not - * NULL or until 'abstime' passes and returns an - * error. If 'abstime' is NULL then the function waits - * forever, i.e. reverts to pthread_join behaviour. - * This function detaches the thread on successful - * completion. - * NOTE: Detached threads cannot be joined or canceled. - * In this implementation 'abstime' will be - * resolved to the nearest millisecond. - * - * RESULTS - * 0 'thread' has completed - * ETIMEDOUT abstime passed - * EINVAL thread is not a joinable thread, - * ESRCH no thread could be found with ID 'thread', - * ENOENT thread couldn't find it's own valid handle, - * EDEADLK attempt to join thread with self - * - * ------------------------------------------------------ - */ -{ - int result; - pthread_t self; - DWORD milliseconds; - __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; - __ptw32_mcs_local_node_t node; - - if (abstime == NULL) - { - milliseconds = INFINITE; - } - else - { - /* - * Calculate timeout as milliseconds from current system time. - */ - milliseconds = __ptw32_relmillisecs (abstime); - } - - __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); - - if (NULL == tp - || thread.x != tp->ptHandle.x) - { - result = ESRCH; - } - else if (PTHREAD_CREATE_DETACHED == tp->detachState) - { - result = EINVAL; - } - else - { - result = 0; - } - - __ptw32_mcs_lock_release(&node); - - if (result == 0) - { - /* - * The target thread is joinable and can't be reused before we join it. - */ - self = pthread_self(); - - if (NULL == self.p) - { - result = ENOENT; - } - else if (pthread_equal (self, thread)) - { - result = EDEADLK; - } - else - { - /* - * Pthread_join is a cancellation point. - * If we are canceled then our target thread must not be - * detached (destroyed). This is guaranteed because - * pthreadCancelableTimedWait will not return if we - * are canceled. - */ - result = pthreadCancelableTimedWait (tp->threadH, milliseconds); - - if (0 == result) - { - if (value_ptr != NULL) - { - *value_ptr = tp->exitStatus; - } - - /* - * The result of making multiple simultaneous calls to - * pthread_join() or pthread_timedjoin_np() or pthread_detach() - * specifying the same target is undefined. - */ - result = pthread_detach (thread); - } - else if (ETIMEDOUT != result) - { - result = ESRCH; - } - } - } - - return (result); - -} +/* + * pthread_timedjoin_np.c + * + * Description: + * This translation unit implements functions related to thread + * synchronisation. + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "pthread.h" +#include "implement.h" + +/* + * Not needed yet, but defining it should indicate clashes with build target + * environment that should be fixed. + */ +#if !defined(WINCE) +# include +#endif + + +int +pthread_timedjoin_np (pthread_t thread, void **value_ptr, const struct timespec *abstime) + /* + * ------------------------------------------------------ + * DOCPUBLIC + * This function waits for 'thread' to terminate and + * returns the thread's exit value if 'value_ptr' is not + * NULL or until 'abstime' passes and returns an + * error. If 'abstime' is NULL then the function waits + * forever, i.e. reverts to pthread_join behaviour. + * This function detaches the thread on successful + * completion. + * + * PARAMETERS + * thread + * an instance of pthread_t + * + * value_ptr + * pointer to an instance of pointer to void + * + * abstime + * pointer to an instance of struct timespec + * representing an absolute time value + * + * + * DESCRIPTION + * This function waits for 'thread' to terminate and + * returns the thread's exit value if 'value_ptr' is not + * NULL or until 'abstime' passes and returns an + * error. If 'abstime' is NULL then the function waits + * forever, i.e. reverts to pthread_join behaviour. + * This function detaches the thread on successful + * completion. + * NOTE: Detached threads cannot be joined or canceled. + * In this implementation 'abstime' will be + * resolved to the nearest millisecond. + * + * RESULTS + * 0 'thread' has completed + * ETIMEDOUT abstime passed + * EINVAL thread is not a joinable thread, + * ESRCH no thread could be found with ID 'thread', + * ENOENT thread couldn't find it's own valid handle, + * EDEADLK attempt to join thread with self + * + * ------------------------------------------------------ + */ +{ + int result; + pthread_t self; + DWORD milliseconds; + __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; + __ptw32_mcs_local_node_t node; + + if (abstime == NULL) + { + milliseconds = INFINITE; + } + else + { + /* + * Calculate timeout as milliseconds from current system time. + */ + milliseconds = __ptw32_relmillisecs (abstime); + } + + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); + + if (NULL == tp + || thread.x != tp->ptHandle.x) + { + result = ESRCH; + } + else if (PTHREAD_CREATE_DETACHED == tp->detachState) + { + result = EINVAL; + } + else + { + result = 0; + } + + __ptw32_mcs_lock_release(&node); + + if (result == 0) + { + /* + * The target thread is joinable and can't be reused before we join it. + */ + self = pthread_self(); + + if (NULL == self.p) + { + result = ENOENT; + } + else if (pthread_equal (self, thread)) + { + result = EDEADLK; + } + else + { + /* + * Pthread_join is a cancellation point. + * If we are canceled then our target thread must not be + * detached (destroyed). This is guaranteed because + * pthreadCancelableTimedWait will not return if we + * are canceled. + */ + result = pthreadCancelableTimedWait (tp->threadH, milliseconds); + + if (0 == result) + { + if (value_ptr != NULL) + { + *value_ptr = tp->exitStatus; + } + + /* + * The result of making multiple simultaneous calls to + * pthread_join() or pthread_timedjoin_np() or pthread_detach() + * specifying the same target is undefined. + */ + result = pthread_detach (thread); + } + else if (ETIMEDOUT != result) + { + result = ESRCH; + } + } + } + + return (result); + +} diff --git a/pthread_tryjoin_np.c b/pthread_tryjoin_np.c index cdc47584..4b62d1e9 100644 --- a/pthread_tryjoin_np.c +++ b/pthread_tryjoin_np.c @@ -1,173 +1,170 @@ -/* - * pthread_tryjoin_np.c - * - * Description: - * This translation unit implements functions related to thread - * synchronisation. - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "pthread.h" -#include "implement.h" - -/* - * Not needed yet, but defining it should indicate clashes with build target - * environment that should be fixed. - */ -#if !defined(WINCE) -# include -#endif - - -int -pthread_tryjoin_np (pthread_t thread, void **value_ptr) - /* - * ------------------------------------------------------ - * DOCPUBLIC - * This function checks if 'thread' has terminated and - * returns the thread's exit value if 'value_ptr' is not - * NULL or until 'abstime' passes and returns an - * error. If the thread has not exited the function returns - * immediately. This function detaches the thread on successful - * completion. - * - * PARAMETERS - * thread - * an instance of pthread_t - * - * value_ptr - * pointer to an instance of pointer to void - * - * - * DESCRIPTION - * This function checks if 'thread' has terminated and - * returns the thread's exit value if 'value_ptr' is not - * NULL or until 'abstime' passes and returns an - * error. If the thread has not exited the function returns - * immediately. This function detaches the thread on successful - * completion. - * NOTE: Detached threads cannot be joined or canceled. - * In this implementation 'abstime' will be - * resolved to the nearest millisecond. - * - * RESULTS - * 0 'thread' has completed - * EBUSY 'thread' is still live - * EINVAL thread is not a joinable thread, - * ESRCH no thread could be found with ID 'thread', - * ENOENT thread couldn't find it's own valid handle, - * EDEADLK attempt to join thread with self - * - * ------------------------------------------------------ - */ -{ - int result; - pthread_t self; - __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; - __ptw32_mcs_local_node_t node; - - __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); - - if (NULL == tp - || thread.x != tp->ptHandle.x) - { - result = ESRCH; - } - else if (PTHREAD_CREATE_DETACHED == tp->detachState) - { - result = EINVAL; - } - else - { - result = 0; - } - - __ptw32_mcs_lock_release(&node); - - if (result == 0) - { - /* - * The target thread is joinable and can't be reused before we join it. - */ - self = pthread_self(); - - if (NULL == self.p) - { - result = ENOENT; - } - else if (pthread_equal (self, thread)) - { - result = EDEADLK; - } - else - { - /* - * Pthread_join is a cancellation point. - * If we are canceled then our target thread must not be - * detached (destroyed). This is guaranteed because - * pthreadCancelableTimedWait will not return if we - * are canceled. - */ - result = pthreadCancelableTimedWait (tp->threadH, 0); - - if (0 == result) - { - if (value_ptr != NULL) - { - *value_ptr = tp->exitStatus; - } - - /* - * The result of making multiple simultaneous calls to - * pthread_join(), pthread_timedjoin_np(), pthread_tryjoin_np() - * or pthread_detach() specifying the same target is undefined. - */ - result = pthread_detach (thread); - } - else if (ETIMEDOUT == result) - { - result = EBUSY; - } - else - { - result = ESRCH; - } - } - } - - return (result); - -} +/* + * pthread_tryjoin_np.c + * + * Description: + * This translation unit implements functions related to thread + * synchronisation. + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "pthread.h" +#include "implement.h" + +/* + * Not needed yet, but defining it should indicate clashes with build target + * environment that should be fixed. + */ +#if !defined(WINCE) +# include +#endif + + +int +pthread_tryjoin_np (pthread_t thread, void **value_ptr) + /* + * ------------------------------------------------------ + * DOCPUBLIC + * This function checks if 'thread' has terminated and + * returns the thread's exit value if 'value_ptr' is not + * NULL or until 'abstime' passes and returns an + * error. If the thread has not exited the function returns + * immediately. This function detaches the thread on successful + * completion. + * + * PARAMETERS + * thread + * an instance of pthread_t + * + * value_ptr + * pointer to an instance of pointer to void + * + * + * DESCRIPTION + * This function checks if 'thread' has terminated and + * returns the thread's exit value if 'value_ptr' is not + * NULL or until 'abstime' passes and returns an + * error. If the thread has not exited the function returns + * immediately. This function detaches the thread on successful + * completion. + * NOTE: Detached threads cannot be joined or canceled. + * In this implementation 'abstime' will be + * resolved to the nearest millisecond. + * + * RESULTS + * 0 'thread' has completed + * EBUSY 'thread' is still live + * EINVAL thread is not a joinable thread, + * ESRCH no thread could be found with ID 'thread', + * ENOENT thread couldn't find it's own valid handle, + * EDEADLK attempt to join thread with self + * + * ------------------------------------------------------ + */ +{ + int result; + pthread_t self; + __ptw32_thread_t * tp = (__ptw32_thread_t *) thread.p; + __ptw32_mcs_local_node_t node; + + __ptw32_mcs_lock_acquire(&__ptw32_thread_reuse_lock, &node); + + if (NULL == tp + || thread.x != tp->ptHandle.x) + { + result = ESRCH; + } + else if (PTHREAD_CREATE_DETACHED == tp->detachState) + { + result = EINVAL; + } + else + { + result = 0; + } + + __ptw32_mcs_lock_release(&node); + + if (result == 0) + { + /* + * The target thread is joinable and can't be reused before we join it. + */ + self = pthread_self(); + + if (NULL == self.p) + { + result = ENOENT; + } + else if (pthread_equal (self, thread)) + { + result = EDEADLK; + } + else + { + /* + * Pthread_join is a cancellation point. + * If we are canceled then our target thread must not be + * detached (destroyed). This is guaranteed because + * pthreadCancelableTimedWait will not return if we + * are canceled. + */ + result = pthreadCancelableTimedWait (tp->threadH, 0); + + if (0 == result) + { + if (value_ptr != NULL) + { + *value_ptr = tp->exitStatus; + } + + /* + * The result of making multiple simultaneous calls to + * pthread_join(), pthread_timedjoin_np(), pthread_tryjoin_np() + * or pthread_detach() specifying the same target is undefined. + */ + result = pthread_detach (thread); + } + else if (ETIMEDOUT == result) + { + result = EBUSY; + } + else + { + result = ESRCH; + } + } + } + + return (result); + +} diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c index 247681dd..2f7e0787 100644 --- a/pthread_win32_attach_detach_np.c +++ b/pthread_win32_attach_detach_np.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c index 48623a58..61609ec9 100644 --- a/ptw32_MCS_lock.c +++ b/ptw32_MCS_lock.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /* diff --git a/ptw32_callUserDestroyRoutines.c b/ptw32_callUserDestroyRoutines.c index d0d20321..ec58ff71 100644 --- a/ptw32_callUserDestroyRoutines.c +++ b/ptw32_callUserDestroyRoutines.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_calloc.c b/ptw32_calloc.c index bc6a5b0e..c583733a 100644 --- a/ptw32_calloc.c +++ b/ptw32_calloc.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_cond_check_need_init.c b/ptw32_cond_check_need_init.c index fb3e41f7..8c86b959 100644 --- a/ptw32_cond_check_need_init.c +++ b/ptw32_cond_check_need_init.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_getprocessors.c b/ptw32_getprocessors.c index 0ec6054c..937383b8 100644 --- a/ptw32_getprocessors.c +++ b/ptw32_getprocessors.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_is_attr.c b/ptw32_is_attr.c index 01ca0363..be5f1664 100644 --- a/ptw32_is_attr.c +++ b/ptw32_is_attr.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_mutex_check_need_init.c b/ptw32_mutex_check_need_init.c index 6c189a57..a694a53e 100644 --- a/ptw32_mutex_check_need_init.c +++ b/ptw32_mutex_check_need_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_new.c b/ptw32_new.c index 79c673af..fac6f73b 100644 --- a/ptw32_new.c +++ b/ptw32_new.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_processInitialize.c b/ptw32_processInitialize.c index b9a64c5a..3fb6dddb 100644 --- a/ptw32_processInitialize.c +++ b/ptw32_processInitialize.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_processTerminate.c b/ptw32_processTerminate.c index f53ad5a6..a3cc434c 100644 --- a/ptw32_processTerminate.c +++ b/ptw32_processTerminate.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_relmillisecs.c b/ptw32_relmillisecs.c index 7ea14185..e084c238 100644 --- a/ptw32_relmillisecs.c +++ b/ptw32_relmillisecs.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_reuse.c b/ptw32_reuse.c index 86df4f88..0ddd2398 100644 --- a/ptw32_reuse.c +++ b/ptw32_reuse.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_rwlock_cancelwrwait.c b/ptw32_rwlock_cancelwrwait.c index 9552833c..5fe70801 100644 --- a/ptw32_rwlock_cancelwrwait.c +++ b/ptw32_rwlock_cancelwrwait.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_rwlock_check_need_init.c b/ptw32_rwlock_check_need_init.c index a4a2bbbb..937a6f81 100644 --- a/ptw32_rwlock_check_need_init.c +++ b/ptw32_rwlock_check_need_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_semwait.c b/ptw32_semwait.c index d9b1bdd2..c9f10779 100644 --- a/ptw32_semwait.c +++ b/ptw32_semwait.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_spinlock_check_need_init.c b/ptw32_spinlock_check_need_init.c index 52db677b..41390227 100644 --- a/ptw32_spinlock_check_need_init.c +++ b/ptw32_spinlock_check_need_init.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_threadDestroy.c b/ptw32_threadDestroy.c index 065b2dd9..bd3835a5 100644 --- a/ptw32_threadDestroy.c +++ b/ptw32_threadDestroy.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c index da74bc01..89635a30 100644 --- a/ptw32_threadStart.c +++ b/ptw32_threadStart.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_throw.c b/ptw32_throw.c index 95b84027..a3993f2d 100644 --- a/ptw32_throw.c +++ b/ptw32_throw.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_timespec.c b/ptw32_timespec.c index cd9782c5..94c7f3aa 100644 --- a/ptw32_timespec.c +++ b/ptw32_timespec.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_tkAssocCreate.c b/ptw32_tkAssocCreate.c index 153b8162..9f350ed7 100644 --- a/ptw32_tkAssocCreate.c +++ b/ptw32_tkAssocCreate.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/ptw32_tkAssocDestroy.c b/ptw32_tkAssocDestroy.c index c150384e..fdf95578 100644 --- a/ptw32_tkAssocDestroy.c +++ b/ptw32_tkAssocDestroy.c @@ -7,33 +7,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sched.h b/sched.h index 89d54481..34800304 100644 --- a/sched.h +++ b/sched.h @@ -9,33 +9,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #if !defined(_SCHED_H) #define _SCHED_H diff --git a/sched_get_priority_max.c b/sched_get_priority_max.c index 456a7adf..977889b5 100644 --- a/sched_get_priority_max.c +++ b/sched_get_priority_max.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sched_get_priority_min.c b/sched_get_priority_min.c index 9d7e367c..fbd47571 100644 --- a/sched_get_priority_min.c +++ b/sched_get_priority_min.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sched_getscheduler.c b/sched_getscheduler.c index e61830c5..d2d091f8 100644 --- a/sched_getscheduler.c +++ b/sched_getscheduler.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sched_setaffinity.c b/sched_setaffinity.c index cf944c9d..95667f2c 100644 --- a/sched_setaffinity.c +++ b/sched_setaffinity.c @@ -1,352 +1,349 @@ -/* - * sched_setaffinity.c - * - * Description: - * POSIX scheduling functions that deal with CPU affinity. - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "pthread.h" -#include "implement.h" -#include "sched.h" - -int -sched_setaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) - /* - * ------------------------------------------------------ - * DOCPUBLIC - * Sets the CPU affinity mask of the process whose ID is pid - * to the value specified by mask. If pid is zero, then the - * calling process is used. The argument cpusetsize is the - * length (in bytes) of the data pointed to by mask. Normally - * this argument would be specified as sizeof(cpu_set_t). - * - * If the process specified by pid is not currently running on - * one of the CPUs specified in mask, then that process is - * migrated to one of the CPUs specified in mask. - * - * PARAMETERS - * pid - * Process ID - * - * cpusetsize - * Currently ignored in pthreads4w. - * Usually set to sizeof(cpu_set_t) - * - * mask - * Pointer to the CPU mask to set (cpu_set_t). - * - * DESCRIPTION - * Sets the CPU affinity mask of the process whose ID is pid - * to the value specified by mask. If pid is zero, then the - * calling process is used. The argument cpusetsize is the - * length (in bytes) of the data pointed to by mask. Normally - * this argument would be specified as sizeof(cpu_set_t). - * - * If the process specified by pid is not currently running on - * one of the CPUs specified in mask, then that process is - * migrated to one of the CPUs specified in mask. - * - * RESULTS - * 0 successfully created semaphore, - * EFAULT 'mask' is a NULL pointer. - * EINVAL '*mask' contains no CPUs in the set - * of available CPUs. - * EAGAIN The system available CPUs could not - * be obtained. - * EPERM The process referred to by 'pid' is - * not modifiable by us. - * ESRCH The process referred to by 'pid' was - * not found. - * ENOSYS Function not supported. - * - * ------------------------------------------------------ - */ -{ -#if ! defined(NEED_PROCESS_AFFINITY_MASK) - - DWORD_PTR vProcessMask; - DWORD_PTR vSystemMask; - HANDLE h; - int targetPid = (int)(size_t) pid; - int result = 0; - - if (NULL == set) - { - result = EFAULT; - } - else - { - if (0 == targetPid) - { - targetPid = (int) GetCurrentProcessId (); - } - - h = OpenProcess (PROCESS_QUERY_INFORMATION|PROCESS_SET_INFORMATION, __PTW32_FALSE, (DWORD) targetPid); - - if (NULL == h) - { - result = (((0xFF & ERROR_ACCESS_DENIED) == GetLastError()) ? EPERM : ESRCH); - } - else - { - if (GetProcessAffinityMask (h, &vProcessMask, &vSystemMask)) - { - /* - * Result is the intersection of available CPUs and the mask. - */ - DWORD_PTR newMask = vSystemMask & ((_sched_cpu_set_vector_*)set)->_cpuset; - - if (newMask) - { - if (SetProcessAffinityMask(h, newMask) == 0) - { - switch (GetLastError()) - { - case (0xFF & ERROR_ACCESS_DENIED): - result = EPERM; - break; - case (0xFF & ERROR_INVALID_PARAMETER): - result = EINVAL; - break; - default: - result = EAGAIN; - break; - } - } - } - else - { - /* - * Mask does not contain any CPUs currently available on the system. - */ - result = EINVAL; - } - } - else - { - result = EAGAIN; - } - } - CloseHandle(h); - } - - if (result != 0) - { - __PTW32_SET_ERRNO(result); - return -1; - } - else - { - return 0; - } - -#else - - __PTW32_SET_ERRNO(ENOSYS); - return -1; - -#endif -} - - -int -sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) - /* - * ------------------------------------------------------ - * DOCPUBLIC - * Gets the CPU affinity mask of the process whose ID is pid - * to the value specified by mask. If pid is zero, then the - * calling process is used. The argument cpusetsize is the - * length (in bytes) of the data pointed to by mask. Normally - * this argument would be specified as sizeof(cpu_set_t). - * - * PARAMETERS - * pid - * Process ID - * - * cpusetsize - * Currently ignored in pthreads4w. - * Usually set to sizeof(cpu_set_t) - * - * mask - * Pointer to the CPU mask to set (cpu_set_t). - * - * DESCRIPTION - * Sets the CPU affinity mask of the process whose ID is pid - * to the value specified by mask. If pid is zero, then the - * calling process is used. The argument cpusetsize is the - * length (in bytes) of the data pointed to by mask. Normally - * this argument would be specified as sizeof(cpu_set_t). - * - * RESULTS - * 0 successfully created semaphore, - * EFAULT 'mask' is a NULL pointer. - * EAGAIN The system available CPUs could not - * be obtained. - * EPERM The process referred to by 'pid' is - * not modifiable by us. - * ESRCH The process referred to by 'pid' was - * not found. - * - * ------------------------------------------------------ - */ -{ - DWORD_PTR vProcessMask; - DWORD_PTR vSystemMask; - HANDLE h; - int targetPid = (int)(size_t) pid; - int result = 0; - - if (NULL == set) - { - result = EFAULT; - } - else - { - -#if ! defined(NEED_PROCESS_AFFINITY_MASK) - - if (0 == targetPid) - { - targetPid = (int) GetCurrentProcessId (); - } - - h = OpenProcess (PROCESS_QUERY_INFORMATION, __PTW32_FALSE, (DWORD) targetPid); - - if (NULL == h) - { - result = (((0xFF & ERROR_ACCESS_DENIED) == GetLastError()) ? EPERM : ESRCH); - } - else - { - if (GetProcessAffinityMask (h, &vProcessMask, &vSystemMask)) - { - ((_sched_cpu_set_vector_*)set)->_cpuset = vProcessMask; - } - else - { - result = EAGAIN; - } - } - CloseHandle(h); - -#else - ((_sched_cpu_set_vector_*)set)->_cpuset = (size_t)0x1; -#endif - - } - - if (result != 0) - { - __PTW32_SET_ERRNO(result); - return -1; - } - else - { - return 0; - } -} - -/* - * Support routines for cpu_set_t - */ -int _sched_affinitycpucount (const cpu_set_t *set) -{ - size_t tset; - int count; - - /* - * Relies on tset being unsigned, otherwise the right-shift will - * be arithmetic rather than logical and the 'for' will loop forever. - */ - for (count = 0, tset = ((_sched_cpu_set_vector_*)set)->_cpuset; tset; tset >>= 1) - { - if (tset & (size_t)1) - { - count++; - } - } - return count; -} - -void _sched_affinitycpuzero (cpu_set_t *pset) -{ - ((_sched_cpu_set_vector_*)pset)->_cpuset = (size_t)0; -} - -void _sched_affinitycpuset (int cpu, cpu_set_t *pset) -{ - ((_sched_cpu_set_vector_*)pset)->_cpuset |= ((size_t)1 << cpu); -} - -void _sched_affinitycpuclr (int cpu, cpu_set_t *pset) -{ - ((_sched_cpu_set_vector_*)pset)->_cpuset &= ~((size_t)1 << cpu); -} - -int _sched_affinitycpuisset (int cpu, const cpu_set_t *pset) -{ - return ((((_sched_cpu_set_vector_*)pset)->_cpuset & - ((size_t)1 << cpu)) != (size_t)0); -} - -void _sched_affinitycpuand(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2) -{ - ((_sched_cpu_set_vector_*)pdestset)->_cpuset = - (((_sched_cpu_set_vector_*)psrcset1)->_cpuset & - ((_sched_cpu_set_vector_*)psrcset2)->_cpuset); -} - -void _sched_affinitycpuor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2) -{ - ((_sched_cpu_set_vector_*)pdestset)->_cpuset = - (((_sched_cpu_set_vector_*)psrcset1)->_cpuset | - ((_sched_cpu_set_vector_*)psrcset2)->_cpuset); -} - -void _sched_affinitycpuxor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2) -{ - ((_sched_cpu_set_vector_*)pdestset)->_cpuset = - (((_sched_cpu_set_vector_*)psrcset1)->_cpuset ^ - ((_sched_cpu_set_vector_*)psrcset2)->_cpuset); -} - -int _sched_affinitycpuequal (const cpu_set_t *pset1, const cpu_set_t *pset2) -{ - return (((_sched_cpu_set_vector_*)pset1)->_cpuset == - ((_sched_cpu_set_vector_*)pset2)->_cpuset); -} +/* + * sched_setaffinity.c + * + * Description: + * POSIX scheduling functions that deal with CPU affinity. + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "pthread.h" +#include "implement.h" +#include "sched.h" + +int +sched_setaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) + /* + * ------------------------------------------------------ + * DOCPUBLIC + * Sets the CPU affinity mask of the process whose ID is pid + * to the value specified by mask. If pid is zero, then the + * calling process is used. The argument cpusetsize is the + * length (in bytes) of the data pointed to by mask. Normally + * this argument would be specified as sizeof(cpu_set_t). + * + * If the process specified by pid is not currently running on + * one of the CPUs specified in mask, then that process is + * migrated to one of the CPUs specified in mask. + * + * PARAMETERS + * pid + * Process ID + * + * cpusetsize + * Currently ignored in pthreads4w. + * Usually set to sizeof(cpu_set_t) + * + * mask + * Pointer to the CPU mask to set (cpu_set_t). + * + * DESCRIPTION + * Sets the CPU affinity mask of the process whose ID is pid + * to the value specified by mask. If pid is zero, then the + * calling process is used. The argument cpusetsize is the + * length (in bytes) of the data pointed to by mask. Normally + * this argument would be specified as sizeof(cpu_set_t). + * + * If the process specified by pid is not currently running on + * one of the CPUs specified in mask, then that process is + * migrated to one of the CPUs specified in mask. + * + * RESULTS + * 0 successfully created semaphore, + * EFAULT 'mask' is a NULL pointer. + * EINVAL '*mask' contains no CPUs in the set + * of available CPUs. + * EAGAIN The system available CPUs could not + * be obtained. + * EPERM The process referred to by 'pid' is + * not modifiable by us. + * ESRCH The process referred to by 'pid' was + * not found. + * ENOSYS Function not supported. + * + * ------------------------------------------------------ + */ +{ +#if ! defined(NEED_PROCESS_AFFINITY_MASK) + + DWORD_PTR vProcessMask; + DWORD_PTR vSystemMask; + HANDLE h; + int targetPid = (int)(size_t) pid; + int result = 0; + + if (NULL == set) + { + result = EFAULT; + } + else + { + if (0 == targetPid) + { + targetPid = (int) GetCurrentProcessId (); + } + + h = OpenProcess (PROCESS_QUERY_INFORMATION|PROCESS_SET_INFORMATION, __PTW32_FALSE, (DWORD) targetPid); + + if (NULL == h) + { + result = (((0xFF & ERROR_ACCESS_DENIED) == GetLastError()) ? EPERM : ESRCH); + } + else + { + if (GetProcessAffinityMask (h, &vProcessMask, &vSystemMask)) + { + /* + * Result is the intersection of available CPUs and the mask. + */ + DWORD_PTR newMask = vSystemMask & ((_sched_cpu_set_vector_*)set)->_cpuset; + + if (newMask) + { + if (SetProcessAffinityMask(h, newMask) == 0) + { + switch (GetLastError()) + { + case (0xFF & ERROR_ACCESS_DENIED): + result = EPERM; + break; + case (0xFF & ERROR_INVALID_PARAMETER): + result = EINVAL; + break; + default: + result = EAGAIN; + break; + } + } + } + else + { + /* + * Mask does not contain any CPUs currently available on the system. + */ + result = EINVAL; + } + } + else + { + result = EAGAIN; + } + } + CloseHandle(h); + } + + if (result != 0) + { + __PTW32_SET_ERRNO(result); + return -1; + } + else + { + return 0; + } + +#else + + __PTW32_SET_ERRNO(ENOSYS); + return -1; + +#endif +} + + +int +sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *set) + /* + * ------------------------------------------------------ + * DOCPUBLIC + * Gets the CPU affinity mask of the process whose ID is pid + * to the value specified by mask. If pid is zero, then the + * calling process is used. The argument cpusetsize is the + * length (in bytes) of the data pointed to by mask. Normally + * this argument would be specified as sizeof(cpu_set_t). + * + * PARAMETERS + * pid + * Process ID + * + * cpusetsize + * Currently ignored in pthreads4w. + * Usually set to sizeof(cpu_set_t) + * + * mask + * Pointer to the CPU mask to set (cpu_set_t). + * + * DESCRIPTION + * Sets the CPU affinity mask of the process whose ID is pid + * to the value specified by mask. If pid is zero, then the + * calling process is used. The argument cpusetsize is the + * length (in bytes) of the data pointed to by mask. Normally + * this argument would be specified as sizeof(cpu_set_t). + * + * RESULTS + * 0 successfully created semaphore, + * EFAULT 'mask' is a NULL pointer. + * EAGAIN The system available CPUs could not + * be obtained. + * EPERM The process referred to by 'pid' is + * not modifiable by us. + * ESRCH The process referred to by 'pid' was + * not found. + * + * ------------------------------------------------------ + */ +{ + DWORD_PTR vProcessMask; + DWORD_PTR vSystemMask; + HANDLE h; + int targetPid = (int)(size_t) pid; + int result = 0; + + if (NULL == set) + { + result = EFAULT; + } + else + { + +#if ! defined(NEED_PROCESS_AFFINITY_MASK) + + if (0 == targetPid) + { + targetPid = (int) GetCurrentProcessId (); + } + + h = OpenProcess (PROCESS_QUERY_INFORMATION, __PTW32_FALSE, (DWORD) targetPid); + + if (NULL == h) + { + result = (((0xFF & ERROR_ACCESS_DENIED) == GetLastError()) ? EPERM : ESRCH); + } + else + { + if (GetProcessAffinityMask (h, &vProcessMask, &vSystemMask)) + { + ((_sched_cpu_set_vector_*)set)->_cpuset = vProcessMask; + } + else + { + result = EAGAIN; + } + } + CloseHandle(h); + +#else + ((_sched_cpu_set_vector_*)set)->_cpuset = (size_t)0x1; +#endif + + } + + if (result != 0) + { + __PTW32_SET_ERRNO(result); + return -1; + } + else + { + return 0; + } +} + +/* + * Support routines for cpu_set_t + */ +int _sched_affinitycpucount (const cpu_set_t *set) +{ + size_t tset; + int count; + + /* + * Relies on tset being unsigned, otherwise the right-shift will + * be arithmetic rather than logical and the 'for' will loop forever. + */ + for (count = 0, tset = ((_sched_cpu_set_vector_*)set)->_cpuset; tset; tset >>= 1) + { + if (tset & (size_t)1) + { + count++; + } + } + return count; +} + +void _sched_affinitycpuzero (cpu_set_t *pset) +{ + ((_sched_cpu_set_vector_*)pset)->_cpuset = (size_t)0; +} + +void _sched_affinitycpuset (int cpu, cpu_set_t *pset) +{ + ((_sched_cpu_set_vector_*)pset)->_cpuset |= ((size_t)1 << cpu); +} + +void _sched_affinitycpuclr (int cpu, cpu_set_t *pset) +{ + ((_sched_cpu_set_vector_*)pset)->_cpuset &= ~((size_t)1 << cpu); +} + +int _sched_affinitycpuisset (int cpu, const cpu_set_t *pset) +{ + return ((((_sched_cpu_set_vector_*)pset)->_cpuset & + ((size_t)1 << cpu)) != (size_t)0); +} + +void _sched_affinitycpuand(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2) +{ + ((_sched_cpu_set_vector_*)pdestset)->_cpuset = + (((_sched_cpu_set_vector_*)psrcset1)->_cpuset & + ((_sched_cpu_set_vector_*)psrcset2)->_cpuset); +} + +void _sched_affinitycpuor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2) +{ + ((_sched_cpu_set_vector_*)pdestset)->_cpuset = + (((_sched_cpu_set_vector_*)psrcset1)->_cpuset | + ((_sched_cpu_set_vector_*)psrcset2)->_cpuset); +} + +void _sched_affinitycpuxor(cpu_set_t *pdestset, const cpu_set_t *psrcset1, const cpu_set_t *psrcset2) +{ + ((_sched_cpu_set_vector_*)pdestset)->_cpuset = + (((_sched_cpu_set_vector_*)psrcset1)->_cpuset ^ + ((_sched_cpu_set_vector_*)psrcset2)->_cpuset); +} + +int _sched_affinitycpuequal (const cpu_set_t *pset1, const cpu_set_t *pset2) +{ + return (((_sched_cpu_set_vector_*)pset1)->_cpuset == + ((_sched_cpu_set_vector_*)pset2)->_cpuset); +} diff --git a/sched_setscheduler.c b/sched_setscheduler.c index 1f166fb9..df7f881b 100644 --- a/sched_setscheduler.c +++ b/sched_setscheduler.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sched_yield.c b/sched_yield.c index 30de449b..228d77dc 100644 --- a/sched_yield.c +++ b/sched_yield.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_close.c b/sem_close.c index 6b317861..25dafc76 100644 --- a/sem_close.c +++ b/sem_close.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_destroy.c b/sem_destroy.c index e1f35b73..478885a7 100644 --- a/sem_destroy.c +++ b/sem_destroy.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_getvalue.c b/sem_getvalue.c index 8c6c0b44..cbe250af 100644 --- a/sem_getvalue.c +++ b/sem_getvalue.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_init.c b/sem_init.c index 3e088d61..a8500b66 100644 --- a/sem_init.c +++ b/sem_init.c @@ -11,33 +11,30 @@ * * ------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_open.c b/sem_open.c index 84f37aab..c11b3691 100644 --- a/sem_open.c +++ b/sem_open.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_post.c b/sem_post.c index 37423fae..ec436980 100644 --- a/sem_post.c +++ b/sem_post.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_post_multiple.c b/sem_post_multiple.c index e14bc8d1..43a7ad6a 100644 --- a/sem_post_multiple.c +++ b/sem_post_multiple.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_timedwait.c b/sem_timedwait.c index 50581b96..84244839 100644 --- a/sem_timedwait.c +++ b/sem_timedwait.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_trywait.c b/sem_trywait.c index 40c8ec8c..a0dc96d8 100644 --- a/sem_trywait.c +++ b/sem_trywait.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_unlink.c b/sem_unlink.c index e5559d37..ba0d86ab 100644 --- a/sem_unlink.c +++ b/sem_unlink.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/sem_wait.c b/sem_wait.c index 710040e4..c80efc49 100644 --- a/sem_wait.c +++ b/sem_wait.c @@ -13,33 +13,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H diff --git a/semaphore.h b/semaphore.h index 4f1c237d..ed0a86e5 100644 --- a/semaphore.h +++ b/semaphore.h @@ -9,33 +9,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999-2012, 2016, Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #if !defined( SEMAPHORE_H ) #define SEMAPHORE_H diff --git a/signal.c b/signal.c index b677b5ac..37548dc2 100644 --- a/signal.c +++ b/signal.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /* diff --git a/tests/Bmakefile b/tests/Bmakefile index 04291245..15054992 100644 --- a/tests/Bmakefile +++ b/tests/Bmakefile @@ -13,7 +13,7 @@ # in the file CONTRIBUTORS included with the source # code distribution. The list can also be seen at the # following World Wide Web location: -# http://sources.redhat.com/pthreads-win32/contributors.html +# https://sourceforge.net/projects/pthreads4w/contributors.html # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/tests/ChangeLog b/tests/ChangeLog index 0abe865d..271ce979 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2016-12-25 Ross Johnson + + * Change all license notices to the Apache License 2.0 + 2016-12-21 Ross Johnson * mutex6.c: fix random failures by using a polling loop to replace diff --git a/tests/GNUmakefile.in b/tests/GNUmakefile.in index 66f85170..ebe33fc2 100644 --- a/tests/GNUmakefile.in +++ b/tests/GNUmakefile.in @@ -3,30 +3,30 @@ # # -------------------------------------------------------------------------- # -# Pthreads-win32 - POSIX Threads Library for Win32 -# Copyright(C) 1998 John E. Bossom -# Copyright(C) 1999,2012 Pthreads-win32 contributors -# -# The current list of contributors is contained -# in the file CONTRIBUTORS included with the source -# code distribution. The list can also be seen at the -# following World Wide Web location: -# http://sources.redhat.com/pthreads-win32/contributors.html -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library in the file COPYING.LIB; -# if not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. # srcdir = @srcdir@ top_srcdir = @top_srcdir@ diff --git a/tests/Makefile b/tests/Makefile index 511f65c2..9750593a 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -11,7 +11,7 @@ # in the file CONTRIBUTORS included with the source # code distribution. The list can also be seen at the # following World Wide Web location: -# http://sources.redhat.com/pthreads-win32/contributors.html +# https://sourceforge.net/projects/pthreads4w/contributors.html # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/tests/Wmakefile b/tests/Wmakefile index fceeda47..053880dd 100644 --- a/tests/Wmakefile +++ b/tests/Wmakefile @@ -13,7 +13,7 @@ # in the file CONTRIBUTORS included with the source # code distribution. The list can also be seen at the # following World Wide Web location: -# http://sources.redhat.com/pthreads-win32/contributors.html +# https://sourceforge.net/projects/pthreads4w/contributors.html # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/tests/affinity1.c b/tests/affinity1.c index 3a80eeae..729b2014 100644 --- a/tests/affinity1.c +++ b/tests/affinity1.c @@ -1,126 +1,123 @@ -/* - * affinity1.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Basic test of CPU_*() support routines. - * - */ - -#if ! defined(WINCE) - -#include "test.h" - -int -main() -{ - unsigned int cpu; - cpu_set_t newmask; - cpu_set_t src1mask; - cpu_set_t src2mask; - cpu_set_t src3mask; - - CPU_ZERO(&newmask); - CPU_ZERO(&src1mask); - memset(&src2mask, 0, sizeof(cpu_set_t)); - assert(memcmp(&src1mask, &src2mask, sizeof(cpu_set_t)) == 0); - assert(CPU_EQUAL(&src1mask, &src2mask)); - assert(CPU_COUNT(&src1mask) == 0); - - CPU_ZERO(&src1mask); - CPU_ZERO(&src2mask); - CPU_ZERO(&src3mask); - - for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &src1mask); /* 0b01010101010101010101010101010101 */ - } - for (cpu = 0; cpu < sizeof(cpu_set_t)*4; cpu++) - { - CPU_SET(cpu, &src2mask); /* 0b00000000000000001111111111111111 */ - } - for (cpu = sizeof(cpu_set_t)*4; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &src2mask); /* 0b01010101010101011111111111111111 */ - } - for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &src3mask); /* 0b01010101010101010101010101010101 */ - } - - assert(CPU_COUNT(&src1mask) == (sizeof(cpu_set_t)*4)); - assert(CPU_COUNT(&src2mask) == ((sizeof(cpu_set_t)*4 + (sizeof(cpu_set_t)*2)))); - assert(CPU_COUNT(&src3mask) == (sizeof(cpu_set_t)*4)); - CPU_SET(0, &newmask); - CPU_SET(1, &newmask); - CPU_SET(3, &newmask); - assert(CPU_ISSET(1, &newmask)); - CPU_CLR(1, &newmask); - assert(!CPU_ISSET(1, &newmask)); - CPU_OR(&newmask, &src1mask, &src2mask); - assert(CPU_EQUAL(&newmask, &src2mask)); - CPU_AND(&newmask, &src1mask, &src2mask); - assert(CPU_EQUAL(&newmask, &src1mask)); - CPU_XOR(&newmask, &src1mask, &src3mask); - memset(&src2mask, 0, sizeof(cpu_set_t)); - assert(memcmp(&newmask, &src2mask, sizeof(cpu_set_t)) == 0); - - /* - * Need to confirm the bitwise logical right-shift in CpuCount(). - * i.e. zeros inserted into MSB on shift because cpu_set_t is - * unsigned. - */ - CPU_ZERO(&src1mask); - for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &src1mask); /* 0b10101010101010101010101010101010 */ - } - assert(CPU_ISSET(sizeof(cpu_set_t)*8-1, &src1mask)); - assert(CPU_COUNT(&src1mask) == (sizeof(cpu_set_t)*4)); - - return 0; -} - -#else - -#include - -int -main() -{ - fprintf(stderr, "Test N/A for this target environment.\n"); - return 0; -} - -#endif +/* + * affinity1.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Basic test of CPU_*() support routines. + * + */ + +#if ! defined(WINCE) + +#include "test.h" + +int +main() +{ + unsigned int cpu; + cpu_set_t newmask; + cpu_set_t src1mask; + cpu_set_t src2mask; + cpu_set_t src3mask; + + CPU_ZERO(&newmask); + CPU_ZERO(&src1mask); + memset(&src2mask, 0, sizeof(cpu_set_t)); + assert(memcmp(&src1mask, &src2mask, sizeof(cpu_set_t)) == 0); + assert(CPU_EQUAL(&src1mask, &src2mask)); + assert(CPU_COUNT(&src1mask) == 0); + + CPU_ZERO(&src1mask); + CPU_ZERO(&src2mask); + CPU_ZERO(&src3mask); + + for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &src1mask); /* 0b01010101010101010101010101010101 */ + } + for (cpu = 0; cpu < sizeof(cpu_set_t)*4; cpu++) + { + CPU_SET(cpu, &src2mask); /* 0b00000000000000001111111111111111 */ + } + for (cpu = sizeof(cpu_set_t)*4; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &src2mask); /* 0b01010101010101011111111111111111 */ + } + for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &src3mask); /* 0b01010101010101010101010101010101 */ + } + + assert(CPU_COUNT(&src1mask) == (sizeof(cpu_set_t)*4)); + assert(CPU_COUNT(&src2mask) == ((sizeof(cpu_set_t)*4 + (sizeof(cpu_set_t)*2)))); + assert(CPU_COUNT(&src3mask) == (sizeof(cpu_set_t)*4)); + CPU_SET(0, &newmask); + CPU_SET(1, &newmask); + CPU_SET(3, &newmask); + assert(CPU_ISSET(1, &newmask)); + CPU_CLR(1, &newmask); + assert(!CPU_ISSET(1, &newmask)); + CPU_OR(&newmask, &src1mask, &src2mask); + assert(CPU_EQUAL(&newmask, &src2mask)); + CPU_AND(&newmask, &src1mask, &src2mask); + assert(CPU_EQUAL(&newmask, &src1mask)); + CPU_XOR(&newmask, &src1mask, &src3mask); + memset(&src2mask, 0, sizeof(cpu_set_t)); + assert(memcmp(&newmask, &src2mask, sizeof(cpu_set_t)) == 0); + + /* + * Need to confirm the bitwise logical right-shift in CpuCount(). + * i.e. zeros inserted into MSB on shift because cpu_set_t is + * unsigned. + */ + CPU_ZERO(&src1mask); + for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &src1mask); /* 0b10101010101010101010101010101010 */ + } + assert(CPU_ISSET(sizeof(cpu_set_t)*8-1, &src1mask)); + assert(CPU_COUNT(&src1mask) == (sizeof(cpu_set_t)*4)); + + return 0; +} + +#else + +#include + +int +main() +{ + fprintf(stderr, "Test N/A for this target environment.\n"); + return 0; +} + +#endif diff --git a/tests/affinity2.c b/tests/affinity2.c index 29963eac..f5bfa352 100644 --- a/tests/affinity2.c +++ b/tests/affinity2.c @@ -1,117 +1,114 @@ -/* - * affinity2.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Have the process switch CPUs. - * - */ - -#if ! defined(WINCE) - -#include "test.h" - -int -main() -{ - unsigned int cpu; - int result; - cpu_set_t newmask; - cpu_set_t mask; - cpu_set_t switchmask; - cpu_set_t flipmask; - - CPU_ZERO(&mask); - CPU_ZERO(&switchmask); - CPU_ZERO(&flipmask); - - for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &switchmask); /* 0b01010101010101010101010101010101 */ - } - for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu++) - { - CPU_SET(cpu, &flipmask); /* 0b11111111111111111111111111111111 */ - } - - assert(sched_getaffinity(0, sizeof(cpu_set_t), &newmask) == 0); - assert(!CPU_EQUAL(&newmask, &mask)); - - result = sched_setaffinity(0, sizeof(cpu_set_t), &newmask); - if (result != 0) - { - int err = -#if defined (__PTW32_USES_SEPARATE_CRT) - GetLastError(); -#else - errno; -#endif - - assert(err != ESRCH); - assert(err != EFAULT); - assert(err != EPERM); - assert(err != EINVAL); - assert(err != EAGAIN); - assert(err == ENOSYS); - assert(CPU_COUNT(&mask) == 1); - } - else - { - if (CPU_COUNT(&mask) > 1) - { - CPU_AND(&newmask, &mask, &switchmask); /* Remove every other CPU */ - assert(sched_setaffinity(0, sizeof(cpu_set_t), &newmask) == 0); - assert(sched_getaffinity(0, sizeof(cpu_set_t), &mask) == 0); - CPU_XOR(&newmask, &mask, &flipmask); /* Switch to all alternative CPUs */ - assert(sched_setaffinity(0, sizeof(cpu_set_t), &newmask) == 0); - assert(sched_getaffinity(0, sizeof(cpu_set_t), &mask) == 0); - assert(!CPU_EQUAL(&newmask, &mask)); - } - } - - return 0; -} - -#else - -#include - -int -main() -{ - fprintf(stderr, "Test N/A for this target environment.\n"); - return 0; -} - -#endif +/* + * affinity2.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Have the process switch CPUs. + * + */ + +#if ! defined(WINCE) + +#include "test.h" + +int +main() +{ + unsigned int cpu; + int result; + cpu_set_t newmask; + cpu_set_t mask; + cpu_set_t switchmask; + cpu_set_t flipmask; + + CPU_ZERO(&mask); + CPU_ZERO(&switchmask); + CPU_ZERO(&flipmask); + + for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &switchmask); /* 0b01010101010101010101010101010101 */ + } + for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu++) + { + CPU_SET(cpu, &flipmask); /* 0b11111111111111111111111111111111 */ + } + + assert(sched_getaffinity(0, sizeof(cpu_set_t), &newmask) == 0); + assert(!CPU_EQUAL(&newmask, &mask)); + + result = sched_setaffinity(0, sizeof(cpu_set_t), &newmask); + if (result != 0) + { + int err = +#if defined (__PTW32_USES_SEPARATE_CRT) + GetLastError(); +#else + errno; +#endif + + assert(err != ESRCH); + assert(err != EFAULT); + assert(err != EPERM); + assert(err != EINVAL); + assert(err != EAGAIN); + assert(err == ENOSYS); + assert(CPU_COUNT(&mask) == 1); + } + else + { + if (CPU_COUNT(&mask) > 1) + { + CPU_AND(&newmask, &mask, &switchmask); /* Remove every other CPU */ + assert(sched_setaffinity(0, sizeof(cpu_set_t), &newmask) == 0); + assert(sched_getaffinity(0, sizeof(cpu_set_t), &mask) == 0); + CPU_XOR(&newmask, &mask, &flipmask); /* Switch to all alternative CPUs */ + assert(sched_setaffinity(0, sizeof(cpu_set_t), &newmask) == 0); + assert(sched_getaffinity(0, sizeof(cpu_set_t), &mask) == 0); + assert(!CPU_EQUAL(&newmask, &mask)); + } + } + + return 0; +} + +#else + +#include + +int +main() +{ + fprintf(stderr, "Test N/A for this target environment.\n"); + return 0; +} + +#endif diff --git a/tests/affinity3.c b/tests/affinity3.c index fa5de857..27c11e42 100644 --- a/tests/affinity3.c +++ b/tests/affinity3.c @@ -1,120 +1,117 @@ -/* - * affinity3.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Have the thread switch CPUs. - * - */ - -#if ! defined(WINCE) - -#include "test.h" - -int -main() -{ - int result; - unsigned int cpu; - cpu_set_t newmask; - cpu_set_t processCpus; - cpu_set_t mask; - cpu_set_t switchmask; - cpu_set_t flipmask; - pthread_t self = pthread_self(); - - CPU_ZERO(&mask); - CPU_ZERO(&switchmask); - CPU_ZERO(&flipmask); - - if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &processCpus) == ENOSYS) - { - printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); - return 0; - } - assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &processCpus) == 0); - printf("This thread has a starting affinity with %d CPUs\n", CPU_COUNT(&processCpus)); - assert(!CPU_EQUAL(&mask, &processCpus)); - - for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &switchmask); /* 0b01010101010101010101010101010101 */ - } - for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu++) - { - CPU_SET(cpu, &flipmask); /* 0b11111111111111111111111111111111 */ - } - - result = pthread_setaffinity_np(self, sizeof(cpu_set_t), &processCpus); - if (result != 0) - { - assert(result != ESRCH); - assert(result != EFAULT); - assert(result != EPERM); - assert(result != EINVAL); - assert(result != EAGAIN); - assert(result == ENOSYS); - assert(CPU_COUNT(&mask) == 1); - } - else - { - if (CPU_COUNT(&mask) > 1) - { - CPU_AND(&newmask, &processCpus, &switchmask); /* Remove every other CPU */ - assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &newmask) == 0); - assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &mask) == 0); - assert(CPU_EQUAL(&mask, &newmask)); - CPU_XOR(&newmask, &mask, &flipmask); /* Switch to all alternative CPUs */ - assert(!CPU_EQUAL(&mask, &newmask)); - assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &newmask) == 0); - assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &mask) == 0); - assert(CPU_EQUAL(&mask, &newmask)); - } - } - - return 0; -} - -#else - -#include - -int -main() -{ - fprintf(stderr, "Test N/A for this target environment.\n"); - return 0; -} - -#endif +/* + * affinity3.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Have the thread switch CPUs. + * + */ + +#if ! defined(WINCE) + +#include "test.h" + +int +main() +{ + int result; + unsigned int cpu; + cpu_set_t newmask; + cpu_set_t processCpus; + cpu_set_t mask; + cpu_set_t switchmask; + cpu_set_t flipmask; + pthread_t self = pthread_self(); + + CPU_ZERO(&mask); + CPU_ZERO(&switchmask); + CPU_ZERO(&flipmask); + + if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &processCpus) == ENOSYS) + { + printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); + return 0; + } + assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &processCpus) == 0); + printf("This thread has a starting affinity with %d CPUs\n", CPU_COUNT(&processCpus)); + assert(!CPU_EQUAL(&mask, &processCpus)); + + for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &switchmask); /* 0b01010101010101010101010101010101 */ + } + for (cpu = 0; cpu < sizeof(cpu_set_t)*8; cpu++) + { + CPU_SET(cpu, &flipmask); /* 0b11111111111111111111111111111111 */ + } + + result = pthread_setaffinity_np(self, sizeof(cpu_set_t), &processCpus); + if (result != 0) + { + assert(result != ESRCH); + assert(result != EFAULT); + assert(result != EPERM); + assert(result != EINVAL); + assert(result != EAGAIN); + assert(result == ENOSYS); + assert(CPU_COUNT(&mask) == 1); + } + else + { + if (CPU_COUNT(&mask) > 1) + { + CPU_AND(&newmask, &processCpus, &switchmask); /* Remove every other CPU */ + assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &newmask) == 0); + assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &mask) == 0); + assert(CPU_EQUAL(&mask, &newmask)); + CPU_XOR(&newmask, &mask, &flipmask); /* Switch to all alternative CPUs */ + assert(!CPU_EQUAL(&mask, &newmask)); + assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &newmask) == 0); + assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &mask) == 0); + assert(CPU_EQUAL(&mask, &newmask)); + } + } + + return 0; +} + +#else + +#include + +int +main() +{ + fprintf(stderr, "Test N/A for this target environment.\n"); + return 0; +} + +#endif diff --git a/tests/affinity4.c b/tests/affinity4.c index ac1bfcb4..b189d443 100644 --- a/tests/affinity4.c +++ b/tests/affinity4.c @@ -1,91 +1,88 @@ -/* - * affinity4.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Test thread CPU affinity setting. - * - */ - -#if ! defined(WINCE) - -#include "test.h" - -int -main() -{ - unsigned int cpu; - cpu_set_t threadCpus; - DWORD_PTR vThreadMask; - cpu_set_t keepCpus; - pthread_t self = pthread_self(); - - if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == ENOSYS) - { - printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); - return 0; - } - - CPU_ZERO(&keepCpus); - for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &keepCpus); /* 0b10101010101010101010101010101010 */ - } - - assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); - if (CPU_COUNT(&threadCpus) > 1) - { - CPU_AND(&threadCpus, &threadCpus, &keepCpus); - vThreadMask = SetThreadAffinityMask(GetCurrentThread(), (*(PDWORD_PTR)&threadCpus) /* Violating Opacity */); - assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); - vThreadMask = SetThreadAffinityMask(GetCurrentThread(), vThreadMask); - assert(vThreadMask != 0); - assert(memcmp(&vThreadMask, &threadCpus, sizeof(DWORD_PTR)) == 0); - } - - return 0; -} - -#else - -#include - -int -main() -{ - fprintf(stderr, "Test N/A for this target environment.\n"); - return 0; -} - -#endif +/* + * affinity4.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Test thread CPU affinity setting. + * + */ + +#if ! defined(WINCE) + +#include "test.h" + +int +main() +{ + unsigned int cpu; + cpu_set_t threadCpus; + DWORD_PTR vThreadMask; + cpu_set_t keepCpus; + pthread_t self = pthread_self(); + + if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == ENOSYS) + { + printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); + return 0; + } + + CPU_ZERO(&keepCpus); + for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &keepCpus); /* 0b10101010101010101010101010101010 */ + } + + assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); + if (CPU_COUNT(&threadCpus) > 1) + { + CPU_AND(&threadCpus, &threadCpus, &keepCpus); + vThreadMask = SetThreadAffinityMask(GetCurrentThread(), (*(PDWORD_PTR)&threadCpus) /* Violating Opacity */); + assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); + vThreadMask = SetThreadAffinityMask(GetCurrentThread(), vThreadMask); + assert(vThreadMask != 0); + assert(memcmp(&vThreadMask, &threadCpus, sizeof(DWORD_PTR)) == 0); + } + + return 0; +} + +#else + +#include + +int +main() +{ + fprintf(stderr, "Test N/A for this target environment.\n"); + return 0; +} + +#endif diff --git a/tests/affinity5.c b/tests/affinity5.c index 9615bc8f..51ac7447 100644 --- a/tests/affinity5.c +++ b/tests/affinity5.c @@ -1,124 +1,121 @@ -/* - * affinity5.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Test thread CPU affinity inheritance. - * - */ - -#if ! defined(WINCE) - -#include "test.h" - -typedef union -{ - /* Violates opacity */ - cpu_set_t cpuset; - unsigned long int bits; /* To stop GCC complaining about %lx args to printf */ -} cpuset_to_ulint; - -void * -mythread(void * arg) -{ - HANDLE threadH = GetCurrentThread(); - cpu_set_t *parentCpus = (cpu_set_t*) arg; - cpu_set_t threadCpus; - DWORD_PTR vThreadMask; - cpuset_to_ulint a, b; - - assert(pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &threadCpus) == 0); - assert(CPU_EQUAL(parentCpus, &threadCpus)); - vThreadMask = SetThreadAffinityMask(threadH, (*(PDWORD_PTR)&threadCpus) /* Violating Opacity */); - assert(vThreadMask != 0); - assert(memcmp(&vThreadMask, &threadCpus, sizeof(DWORD_PTR)) == 0); - a.cpuset = *parentCpus; - b.cpuset = threadCpus; - /* Violates opacity */ - printf("CPU affinity: Parent/Thread = 0x%lx/0x%lx\n", a.bits, b.bits); - - return (void*) 0; -} - -int -main() -{ - unsigned int cpu; - pthread_t tid; - cpu_set_t threadCpus; - DWORD_PTR vThreadMask; - cpu_set_t keepCpus; - pthread_t self = pthread_self(); - - if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == ENOSYS) - { - printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); - return 0; - } - - CPU_ZERO(&keepCpus); - for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &keepCpus); /* 0b10101010101010101010101010101010 */ - } - - assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); - if (CPU_COUNT(&threadCpus) > 1) - { - assert(pthread_create(&tid, NULL, mythread, (void*)&threadCpus) == 0); - assert(pthread_join(tid, NULL) == 0); - CPU_AND(&threadCpus, &threadCpus, &keepCpus); - assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); - vThreadMask = SetThreadAffinityMask(GetCurrentThread(), (*(PDWORD_PTR)&threadCpus) /* Violating Opacity */); - assert(vThreadMask != 0); - assert(memcmp(&vThreadMask, &threadCpus, sizeof(DWORD_PTR)) == 0); - assert(pthread_create(&tid, NULL, mythread, (void*)&threadCpus) == 0); - assert(pthread_join(tid, NULL) == 0); - } - - return 0; -} - -#else - -#include - -int -main() -{ - fprintf(stderr, "Test N/A for this target environment.\n"); - return 0; -} - -#endif +/* + * affinity5.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Test thread CPU affinity inheritance. + * + */ + +#if ! defined(WINCE) + +#include "test.h" + +typedef union +{ + /* Violates opacity */ + cpu_set_t cpuset; + unsigned long int bits; /* To stop GCC complaining about %lx args to printf */ +} cpuset_to_ulint; + +void * +mythread(void * arg) +{ + HANDLE threadH = GetCurrentThread(); + cpu_set_t *parentCpus = (cpu_set_t*) arg; + cpu_set_t threadCpus; + DWORD_PTR vThreadMask; + cpuset_to_ulint a, b; + + assert(pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &threadCpus) == 0); + assert(CPU_EQUAL(parentCpus, &threadCpus)); + vThreadMask = SetThreadAffinityMask(threadH, (*(PDWORD_PTR)&threadCpus) /* Violating Opacity */); + assert(vThreadMask != 0); + assert(memcmp(&vThreadMask, &threadCpus, sizeof(DWORD_PTR)) == 0); + a.cpuset = *parentCpus; + b.cpuset = threadCpus; + /* Violates opacity */ + printf("CPU affinity: Parent/Thread = 0x%lx/0x%lx\n", a.bits, b.bits); + + return (void*) 0; +} + +int +main() +{ + unsigned int cpu; + pthread_t tid; + cpu_set_t threadCpus; + DWORD_PTR vThreadMask; + cpu_set_t keepCpus; + pthread_t self = pthread_self(); + + if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == ENOSYS) + { + printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); + return 0; + } + + CPU_ZERO(&keepCpus); + for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &keepCpus); /* 0b10101010101010101010101010101010 */ + } + + assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); + if (CPU_COUNT(&threadCpus) > 1) + { + assert(pthread_create(&tid, NULL, mythread, (void*)&threadCpus) == 0); + assert(pthread_join(tid, NULL) == 0); + CPU_AND(&threadCpus, &threadCpus, &keepCpus); + assert(pthread_setaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); + vThreadMask = SetThreadAffinityMask(GetCurrentThread(), (*(PDWORD_PTR)&threadCpus) /* Violating Opacity */); + assert(vThreadMask != 0); + assert(memcmp(&vThreadMask, &threadCpus, sizeof(DWORD_PTR)) == 0); + assert(pthread_create(&tid, NULL, mythread, (void*)&threadCpus) == 0); + assert(pthread_join(tid, NULL) == 0); + } + + return 0; +} + +#else + +#include + +int +main() +{ + fprintf(stderr, "Test N/A for this target environment.\n"); + return 0; +} + +#endif diff --git a/tests/affinity6.c b/tests/affinity6.c index c3b8332d..dceab703 100644 --- a/tests/affinity6.c +++ b/tests/affinity6.c @@ -1,119 +1,116 @@ -/* - * affinity6.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2013 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Test thread CPU affinity from thread attributes. - * - */ - -#if ! defined(WINCE) - -#include "test.h" - -typedef union -{ - /* Violates opacity */ - cpu_set_t cpuset; - unsigned long int bits; /* To stop GCC complaining about %lx args to printf */ -} cpuset_to_ulint; - -void * -mythread(void * arg) -{ - pthread_attr_t *attrPtr = (pthread_attr_t *) arg; - cpu_set_t threadCpus, attrCpus; - - assert(pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &threadCpus) == 0); - assert(pthread_attr_getaffinity_np(attrPtr, sizeof(cpu_set_t), &attrCpus) == 0); - assert(CPU_EQUAL(&attrCpus, &threadCpus)); - - return (void*) 0; -} - -int -main() -{ - unsigned int cpu; - pthread_t tid; - pthread_attr_t attr1, attr2; - cpu_set_t threadCpus; - cpu_set_t keepCpus; - pthread_t self = pthread_self(); - - if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == ENOSYS) - { - printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); - return 0; - } - - assert(pthread_attr_init(&attr1) == 0); - assert(pthread_attr_init(&attr2) == 0); - - CPU_ZERO(&keepCpus); - for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) - { - CPU_SET(cpu, &keepCpus); /* 0b10101010101010101010101010101010 */ - } - - assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); - - if (CPU_COUNT(&threadCpus) > 1) - { - assert(pthread_attr_setaffinity_np(&attr1, sizeof(cpu_set_t), &threadCpus) == 0); - CPU_AND(&threadCpus, &threadCpus, &keepCpus); - assert(pthread_attr_setaffinity_np(&attr2, sizeof(cpu_set_t), &threadCpus) == 0); - - assert(pthread_create(&tid, &attr1, mythread, (void *) &attr1) == 0); - assert(pthread_join(tid, NULL) == 0); - assert(pthread_create(&tid, &attr2, mythread, (void *) &attr2) == 0); - assert(pthread_join(tid, NULL) == 0); - } - assert(pthread_attr_destroy(&attr1) == 0); - assert(pthread_attr_destroy(&attr2) == 0); - return 0; -} - -#else - -#include - -int -main() -{ - fprintf(stderr, "Test N/A for this target environment.\n"); - return 0; -} - -#endif +/* + * affinity6.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Test thread CPU affinity from thread attributes. + * + */ + +#if ! defined(WINCE) + +#include "test.h" + +typedef union +{ + /* Violates opacity */ + cpu_set_t cpuset; + unsigned long int bits; /* To stop GCC complaining about %lx args to printf */ +} cpuset_to_ulint; + +void * +mythread(void * arg) +{ + pthread_attr_t *attrPtr = (pthread_attr_t *) arg; + cpu_set_t threadCpus, attrCpus; + + assert(pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &threadCpus) == 0); + assert(pthread_attr_getaffinity_np(attrPtr, sizeof(cpu_set_t), &attrCpus) == 0); + assert(CPU_EQUAL(&attrCpus, &threadCpus)); + + return (void*) 0; +} + +int +main() +{ + unsigned int cpu; + pthread_t tid; + pthread_attr_t attr1, attr2; + cpu_set_t threadCpus; + cpu_set_t keepCpus; + pthread_t self = pthread_self(); + + if (pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == ENOSYS) + { + printf("pthread_get/set_affinity_np API not supported for this platform: skipping test."); + return 0; + } + + assert(pthread_attr_init(&attr1) == 0); + assert(pthread_attr_init(&attr2) == 0); + + CPU_ZERO(&keepCpus); + for (cpu = 1; cpu < sizeof(cpu_set_t)*8; cpu += 2) + { + CPU_SET(cpu, &keepCpus); /* 0b10101010101010101010101010101010 */ + } + + assert(pthread_getaffinity_np(self, sizeof(cpu_set_t), &threadCpus) == 0); + + if (CPU_COUNT(&threadCpus) > 1) + { + assert(pthread_attr_setaffinity_np(&attr1, sizeof(cpu_set_t), &threadCpus) == 0); + CPU_AND(&threadCpus, &threadCpus, &keepCpus); + assert(pthread_attr_setaffinity_np(&attr2, sizeof(cpu_set_t), &threadCpus) == 0); + + assert(pthread_create(&tid, &attr1, mythread, (void *) &attr1) == 0); + assert(pthread_join(tid, NULL) == 0); + assert(pthread_create(&tid, &attr2, mythread, (void *) &attr2) == 0); + assert(pthread_join(tid, NULL) == 0); + } + assert(pthread_attr_destroy(&attr1) == 0); + assert(pthread_attr_destroy(&attr2) == 0); + return 0; +} + +#else + +#include + +int +main() +{ + fprintf(stderr, "Test N/A for this target environment.\n"); + return 0; +} + +#endif diff --git a/tests/barrier1.c b/tests/barrier1.c index cff727b9..0e566911 100644 --- a/tests/barrier1.c +++ b/tests/barrier1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/barrier2.c b/tests/barrier2.c index 1afd8d07..1b9c62ef 100644 --- a/tests/barrier2.c +++ b/tests/barrier2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/barrier3.c b/tests/barrier3.c index a3145519..8fc22055 100644 --- a/tests/barrier3.c +++ b/tests/barrier3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/barrier4.c b/tests/barrier4.c index 7c427e58..27a5ef78 100644 --- a/tests/barrier4.c +++ b/tests/barrier4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/barrier5.c b/tests/barrier5.c index 86e69838..c4529160 100644 --- a/tests/barrier5.c +++ b/tests/barrier5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/barrier6.c b/tests/barrier6.c index d4d82145..1c3e1cee 100755 --- a/tests/barrier6.c +++ b/tests/barrier6.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/benchlib.c b/tests/benchlib.c index 259c2aec..7c16390c 100644 --- a/tests/benchlib.c +++ b/tests/benchlib.c @@ -3,33 +3,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * */ diff --git a/tests/benchtest.h b/tests/benchtest.h index 5c798452..781bffb3 100644 --- a/tests/benchtest.h +++ b/tests/benchtest.h @@ -3,33 +3,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * */ diff --git a/tests/benchtest1.c b/tests/benchtest1.c index 193d3c76..a442a051 100644 --- a/tests/benchtest1.c +++ b/tests/benchtest1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest2.c b/tests/benchtest2.c index fd25a3df..323807b0 100644 --- a/tests/benchtest2.c +++ b/tests/benchtest2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest3.c b/tests/benchtest3.c index 824c407a..244c81c7 100644 --- a/tests/benchtest3.c +++ b/tests/benchtest3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest4.c b/tests/benchtest4.c index 9e303532..084ba1b5 100644 --- a/tests/benchtest4.c +++ b/tests/benchtest4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/benchtest5.c b/tests/benchtest5.c index beda4726..ed662af8 100644 --- a/tests/benchtest5.c +++ b/tests/benchtest5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel1.c b/tests/cancel1.c index f93c497b..2eb0c1d9 100644 --- a/tests/cancel1.c +++ b/tests/cancel1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel2.c b/tests/cancel2.c index 1e80e668..2c473246 100644 --- a/tests/cancel2.c +++ b/tests/cancel2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel3.c b/tests/cancel3.c index 9ccd490a..9cbcc000 100644 --- a/tests/cancel3.c +++ b/tests/cancel3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel4.c b/tests/cancel4.c index 4267f172..e99bc756 100644 --- a/tests/cancel4.c +++ b/tests/cancel4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel5.c b/tests/cancel5.c index 033ecf10..6cfff573 100644 --- a/tests/cancel5.c +++ b/tests/cancel5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel6a.c b/tests/cancel6a.c index e5da0789..cf60f970 100644 --- a/tests/cancel6a.c +++ b/tests/cancel6a.c @@ -2,25 +2,30 @@ * File: cancel6a.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Contact Email: rpj@ise.canberra.edu.au + * Homepage: https://sourceforge.net/projects/pthreads4w/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel6d.c b/tests/cancel6d.c index f94ed5ac..5c341050 100644 --- a/tests/cancel6d.c +++ b/tests/cancel6d.c @@ -2,25 +2,30 @@ * File: cancel6d.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Contact Email: rpj@ise.canberra.edu.au + * Homepage: https://sourceforge.net/projects/pthreads4w/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel7.c b/tests/cancel7.c index cdd8b156..6d647d29 100644 --- a/tests/cancel7.c +++ b/tests/cancel7.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel8.c b/tests/cancel8.c index 697593f6..6cbe61e7 100644 --- a/tests/cancel8.c +++ b/tests/cancel8.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cancel9.c b/tests/cancel9.c index d9bab65a..6f21e7e7 100644 --- a/tests/cancel9.c +++ b/tests/cancel9.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup0.c b/tests/cleanup0.c index 888640b7..e547f7a6 100644 --- a/tests/cleanup0.c +++ b/tests/cleanup0.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup1.c b/tests/cleanup1.c index 08c63bdd..bf67f605 100644 --- a/tests/cleanup1.c +++ b/tests/cleanup1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup2.c b/tests/cleanup2.c index 52a804e6..ed2f003e 100644 --- a/tests/cleanup2.c +++ b/tests/cleanup2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/cleanup3.c b/tests/cleanup3.c index 7d6a4b96..394f5f7e 100644 --- a/tests/cleanup3.c +++ b/tests/cleanup3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/common.mk b/tests/common.mk index 4552b058..1e652769 100644 --- a/tests/common.mk +++ b/tests/common.mk @@ -1,60 +1,60 @@ -# -# Common elements to all makefiles -# - -ALL_KNOWN_TESTS = \ - affinity1 affinity2 affinity3 affinity4 affinity5 affinity6 \ - barrier1 barrier2 barrier3 barrier4 barrier5 barrier6 \ - cancel1 cancel2 cancel3 cancel4 cancel5 cancel6a cancel6d \ - cancel7 cancel8 cancel9 \ - cleanup0 cleanup1 cleanup2 cleanup3 \ - condvar1 condvar1_1 condvar1_2 condvar2 condvar2_1 \ - condvar3 condvar3_1 condvar3_2 condvar3_3 \ - condvar4 condvar5 condvar6 \ - condvar7 condvar8 condvar9 \ - timeouts \ - count1 \ - context1 \ - create1 create2 create3 \ - delay1 delay2 \ - detach1 \ - equal1 \ - errno1 \ - exception1 exception2 exception3_0 exception3 \ - exit1 exit2 exit3 exit4 exit5 exit6 \ - eyal1 \ - join0 join1 join2 join3 join4 \ - kill1 \ - mutex1 mutex1n mutex1e mutex1r \ - mutex2 mutex2r mutex2e mutex3 mutex3r mutex3e \ - mutex4 mutex5 mutex6 mutex6n mutex6e mutex6r \ - mutex6s mutex6es mutex6rs \ - mutex7 mutex7n mutex7e mutex7r \ - mutex8 mutex8n mutex8e mutex8r \ - name_np1 name_np2 \ - once1 once2 once3 once4 \ - priority1 priority2 inherit1 \ - reinit1 \ - reuse1 reuse2 \ - robust1 robust2 robust3 robust4 robust5 \ - rwlock1 rwlock2 rwlock3 rwlock4 \ - rwlock2_t rwlock3_t rwlock4_t rwlock5_t rwlock6_t rwlock6_t2 \ - rwlock5 rwlock6 rwlock7 rwlock7_1 rwlock8 rwlock8_1 \ - self1 self2 \ - semaphore1 semaphore2 semaphore3 \ - semaphore4 semaphore4t semaphore5 \ - sequence1 \ - sizes \ - spin1 spin2 spin3 spin4 \ - stress1 threestage \ - tsd1 tsd2 tsd3 \ - valid1 valid2 - -TESTS = $(ALL_KNOWN_TESTS) - -BENCHTESTS = \ - benchtest1 benchtest2 benchtest3 benchtest4 benchtest5 - -# Output useful info if no target given. I.e. the first target that "make" sees is used in this case. -default_target: help +# +# Common elements to all makefiles +# + +ALL_KNOWN_TESTS = \ + affinity1 affinity2 affinity3 affinity4 affinity5 affinity6 \ + barrier1 barrier2 barrier3 barrier4 barrier5 barrier6 \ + cancel1 cancel2 cancel3 cancel4 cancel5 cancel6a cancel6d \ + cancel7 cancel8 cancel9 \ + cleanup0 cleanup1 cleanup2 cleanup3 \ + condvar1 condvar1_1 condvar1_2 condvar2 condvar2_1 \ + condvar3 condvar3_1 condvar3_2 condvar3_3 \ + condvar4 condvar5 condvar6 \ + condvar7 condvar8 condvar9 \ + timeouts \ + count1 \ + context1 \ + create1 create2 create3 \ + delay1 delay2 \ + detach1 \ + equal1 \ + errno1 \ + exception1 exception2 exception3_0 exception3 \ + exit1 exit2 exit3 exit4 exit5 exit6 \ + eyal1 \ + join0 join1 join2 join3 join4 \ + kill1 \ + mutex1 mutex1n mutex1e mutex1r \ + mutex2 mutex2r mutex2e mutex3 mutex3r mutex3e \ + mutex4 mutex5 mutex6 mutex6n mutex6e mutex6r \ + mutex6s mutex6es mutex6rs \ + mutex7 mutex7n mutex7e mutex7r \ + mutex8 mutex8n mutex8e mutex8r \ + name_np1 name_np2 \ + once1 once2 once3 once4 \ + priority1 priority2 inherit1 \ + reinit1 \ + reuse1 reuse2 \ + robust1 robust2 robust3 robust4 robust5 \ + rwlock1 rwlock2 rwlock3 rwlock4 \ + rwlock2_t rwlock3_t rwlock4_t rwlock5_t rwlock6_t rwlock6_t2 \ + rwlock5 rwlock6 rwlock7 rwlock7_1 rwlock8 rwlock8_1 \ + self1 self2 \ + semaphore1 semaphore2 semaphore3 \ + semaphore4 semaphore4t semaphore5 \ + sequence1 \ + sizes \ + spin1 spin2 spin3 spin4 \ + stress1 threestage \ + tsd1 tsd2 tsd3 \ + valid1 valid2 + +TESTS = $(ALL_KNOWN_TESTS) + +BENCHTESTS = \ + benchtest1 benchtest2 benchtest3 benchtest4 benchtest5 + +# Output useful info if no target given. I.e. the first target that "make" sees is used in this case. +default_target: help \ No newline at end of file diff --git a/tests/condvar1.c b/tests/condvar1.c index 303a87b8..be495d1d 100644 --- a/tests/condvar1.c +++ b/tests/condvar1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar1_1.c b/tests/condvar1_1.c index 565697e5..d006c0fb 100644 --- a/tests/condvar1_1.c +++ b/tests/condvar1_1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar1_2.c b/tests/condvar1_2.c index 61185518..7b806e4d 100644 --- a/tests/condvar1_2.c +++ b/tests/condvar1_2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar2.c b/tests/condvar2.c index 2ca309f1..ccae417c 100644 --- a/tests/condvar2.c +++ b/tests/condvar2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar2_1.c b/tests/condvar2_1.c index bf8170ca..5fe5eb32 100644 --- a/tests/condvar2_1.c +++ b/tests/condvar2_1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3.c b/tests/condvar3.c index c9943ff8..e55fa795 100644 --- a/tests/condvar3.c +++ b/tests/condvar3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3_1.c b/tests/condvar3_1.c index 16f0a64a..d763e20f 100644 --- a/tests/condvar3_1.c +++ b/tests/condvar3_1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3_2.c b/tests/condvar3_2.c index 909f6a19..9aad4053 100644 --- a/tests/condvar3_2.c +++ b/tests/condvar3_2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar3_3.c b/tests/condvar3_3.c index 54702847..825ba312 100644 --- a/tests/condvar3_3.c +++ b/tests/condvar3_3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar4.c b/tests/condvar4.c index a63104fd..70c04455 100644 --- a/tests/condvar4.c +++ b/tests/condvar4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar5.c b/tests/condvar5.c index feeefbcd..7a579515 100644 --- a/tests/condvar5.c +++ b/tests/condvar5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar6.c b/tests/condvar6.c index 1e4baf2c..43873613 100644 --- a/tests/condvar6.c +++ b/tests/condvar6.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar7.c b/tests/condvar7.c index f1fc30ee..9aff62c6 100644 --- a/tests/condvar7.c +++ b/tests/condvar7.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar8.c b/tests/condvar8.c index a2e0931a..29a5cb4b 100644 --- a/tests/condvar8.c +++ b/tests/condvar8.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/condvar9.c b/tests/condvar9.c index d928fc1e..1f3196b4 100644 --- a/tests/condvar9.c +++ b/tests/condvar9.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/context1.c b/tests/context1.c index 22b0609c..cd6dd86c 100644 --- a/tests/context1.c +++ b/tests/context1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/context2.c b/tests/context2.c index caca5a60..f8a19429 100644 --- a/tests/context2.c +++ b/tests/context2.c @@ -1,159 +1,157 @@ -/* - * File: context2.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2005 Pthreads-win32 contributors - * - * Contact Email: rpj@callisto.canberra.edu.au - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Test Synopsis: Test context switching method. - * - * Test Method (Validation or Falsification): - * - - * - * Requirements Tested: - * - - * - * Features Tested: - * - - * - * Cases Tested: - * - - * - * Description: - * - - * - * Environment: - * - - * - * Input: - * - None. - * - * Output: - * - File name, Line number, and failed expression on failure. - * - No output on success. - * - * Assumptions: - * - pthread_create - * pthread_exit - * - * Pass Criteria: - * - Process returns zero exit status. - * - * Fail Criteria: - * - Process returns non-zero exit status. - */ - -#define _WIN32_WINNT 0x400 - -#include "test.h" -/* Cheating here - sneaking a peek at library internals */ -#include "../config.h" -#include "../implement.h" -#include "../context.h" - -static int washere = 0; -static volatile size_t tree_counter = 0; - -#ifdef _MSC_VER -# pragma inline_depth(0) -# pragma optimize("g", off) -#endif - -static size_t tree(size_t depth) -{ - if (! depth--) - return tree_counter++; - - return tree(depth) + tree(depth); -} - -static void * func(void * arg) -{ - washere = 1; - - return (void *) tree(64); -} - -static void -anotherEnding () -{ - /* - * Switched context - */ - washere++; - pthread_exit(0); -} - -#ifdef _MSC_VER -# pragma inline_depth() -# pragma optimize("", on) -#endif - -int -main() -{ - pthread_t t; - HANDLE hThread; - - assert(pthread_create(&t, NULL, func, NULL) == 0); - - hThread = ((__ptw32_thread_t *)t.p)->threadH; - - Sleep(500); - - SuspendThread(hThread); - - if (WaitForSingleObject(hThread, 0) == WAIT_TIMEOUT) - { - /* - * Ok, thread did not exit before we got to it. - */ - CONTEXT context; - - context.ContextFlags = CONTEXT_CONTROL; - - GetThreadContext(hThread, &context); - __PTW32_PROGCTR (context) = (DWORD_PTR) anotherEnding; - SetThreadContext(hThread, &context); - ResumeThread(hThread); - } - else - { - printf("Exited early\n"); - fflush(stdout); - } - - Sleep(1000); - - assert(washere == 2); - - return 0; -} +/* + * File: context2.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Test Synopsis: Test context switching method. + * + * Test Method (Validation or Falsification): + * - + * + * Requirements Tested: + * - + * + * Features Tested: + * - + * + * Cases Tested: + * - + * + * Description: + * - + * + * Environment: + * - + * + * Input: + * - None. + * + * Output: + * - File name, Line number, and failed expression on failure. + * - No output on success. + * + * Assumptions: + * - pthread_create + * pthread_exit + * + * Pass Criteria: + * - Process returns zero exit status. + * + * Fail Criteria: + * - Process returns non-zero exit status. + */ + +#define _WIN32_WINNT 0x400 + +#include "test.h" +/* Cheating here - sneaking a peek at library internals */ +#include "../config.h" +#include "../implement.h" +#include "../context.h" + +static int washere = 0; +static volatile size_t tree_counter = 0; + +#ifdef _MSC_VER +# pragma inline_depth(0) +# pragma optimize("g", off) +#endif + +static size_t tree(size_t depth) +{ + if (! depth--) + return tree_counter++; + + return tree(depth) + tree(depth); +} + +static void * func(void * arg) +{ + washere = 1; + + return (void *) tree(64); +} + +static void +anotherEnding () +{ + /* + * Switched context + */ + washere++; + pthread_exit(0); +} + +#ifdef _MSC_VER +# pragma inline_depth() +# pragma optimize("", on) +#endif + +int +main() +{ + pthread_t t; + HANDLE hThread; + + assert(pthread_create(&t, NULL, func, NULL) == 0); + + hThread = ((__ptw32_thread_t *)t.p)->threadH; + + Sleep(500); + + SuspendThread(hThread); + + if (WaitForSingleObject(hThread, 0) == WAIT_TIMEOUT) + { + /* + * Ok, thread did not exit before we got to it. + */ + CONTEXT context; + + context.ContextFlags = CONTEXT_CONTROL; + + GetThreadContext(hThread, &context); + __PTW32_PROGCTR (context) = (DWORD_PTR) anotherEnding; + SetThreadContext(hThread, &context); + ResumeThread(hThread); + } + else + { + printf("Exited early\n"); + fflush(stdout); + } + + Sleep(1000); + + assert(washere == 2); + + return 0; +} diff --git a/tests/count1.c b/tests/count1.c index c639fd27..ac08017e 100644 --- a/tests/count1.c +++ b/tests/count1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/create1.c b/tests/create1.c index 63b1bf6e..c64b15fd 100644 --- a/tests/create1.c +++ b/tests/create1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/create2.c b/tests/create2.c index 9e56d9d4..7d73d947 100644 --- a/tests/create2.c +++ b/tests/create2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/create3.c b/tests/create3.c index 5063d0ba..3986f091 100644 --- a/tests/create3.c +++ b/tests/create3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/delay1.c b/tests/delay1.c index 9c5293e8..eedf79b8 100644 --- a/tests/delay1.c +++ b/tests/delay1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/delay2.c b/tests/delay2.c index 5ff6c1de..a510415a 100644 --- a/tests/delay2.c +++ b/tests/delay2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/detach1.c b/tests/detach1.c index 4eb8cb73..df2dd6cd 100644 --- a/tests/detach1.c +++ b/tests/detach1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/equal1.c b/tests/equal1.c index 2dfa7942..60d3ac07 100644 --- a/tests/equal1.c +++ b/tests/equal1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/errno1.c b/tests/errno1.c index 14e8150a..0a361d0c 100644 --- a/tests/errno1.c +++ b/tests/errno1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exception1.c b/tests/exception1.c index 100af205..96984905 100644 --- a/tests/exception1.c +++ b/tests/exception1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exception2.c b/tests/exception2.c index 7842b842..b155b2f8 100644 --- a/tests/exception2.c +++ b/tests/exception2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exception3.c b/tests/exception3.c index 2665bcc7..210e61a8 100644 --- a/tests/exception3.c +++ b/tests/exception3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exception3_0.c b/tests/exception3_0.c index ab25c460..b791c2ee 100644 --- a/tests/exception3_0.c +++ b/tests/exception3_0.c @@ -1,190 +1,187 @@ -/* - * File: exception3.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Test Synopsis: Test running of user supplied terminate() function. - * - * Test Method (Validation or Falsification): - * - - * - * Requirements Tested: - * - - * - * Features Tested: - * - - * - * Cases Tested: - * - - * - * Description: - * - - * - * Environment: - * - - * - * Input: - * - None. - * - * Output: - * - File name, Line number, and failed expression on failure. - * - No output on success. - * - * Assumptions: - * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock - * pthread_testcancel, pthread_cancel - * - * Pass Criteria: - * - Process returns zero exit status. - * - * Fail Criteria: - * - Process returns non-zero exit status. - */ - -#include "test.h" - -/* - * Note: Due to a buggy C++ runtime in Visual Studio 2005, when we are - * built with /MD and an unhandled exception occurs, the runtime does not - * properly call the terminate handler specified by set_terminate(). - */ -#if defined(__cplusplus) \ - && !(defined(_MSC_VER) && _MSC_VER == 1400 && defined(_DLL) && !defined(_DEBUG)) - -#if defined(_MSC_VER) -# include -#else -# if defined(__GNUC__) && __GNUC__ < 3 -# include -# else -# include - using std::set_terminate; -# endif -#endif - -/* - * Create NUMTHREADS threads in addition to the Main thread. - */ -enum { - NUMTHREADS = 10 -}; - -int caught = 0; -CRITICAL_SECTION caughtLock; - -void -terminateFunction () -{ - EnterCriticalSection(&caughtLock); - caught++; -#if 0 - { - FILE * fp = fopen("pthread.log", "a"); - fprintf(fp, "Caught = %d\n", caught); - fclose(fp); - } -#endif - LeaveCriticalSection(&caughtLock); - - /* - * Notes from the MSVC++ manual: - * 1) A term_func() should call exit(), otherwise - * abort() will be called on return to the caller. - * abort() raises SIGABRT. The default signal handler - * for all signals terminates the calling program with - * exit code 3. - * 2) A term_func() must not throw an exception. Dev: Therefore - * term_func() should not call pthread_exit() if an - * exception-using version of pthreads-win32 library - * is being used (i.e. either pthreadVCE or pthreadVSE). - */ - exit(0); -} - -void * -exceptionedThread(void * arg) -{ - int dummy = 0x1; - - set_terminate(&terminateFunction); - assert(set_terminate(&terminateFunction) == &terminateFunction); - - throw dummy; - - return (void *) 2; -} - -int -main() -{ - int i; - DWORD et[NUMTHREADS]; - - DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); - SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX); - - InitializeCriticalSection(&caughtLock); - - for (i = 0; i < NUMTHREADS; i++) - { - CreateThread(NULL, //Choose default security - 0, //Default stack size - (LPTHREAD_START_ROUTINE)&exceptionedThread, //Routine to execute - NULL, //Thread parameter - 0, //Immediately run the thread - &et[i] //Thread Id - ); - } - - Sleep(NUMTHREADS * 10); - - DeleteCriticalSection(&caughtLock); - /* - * Fail. Should never be reached. - */ - return 1; -} - -#else /* defined(__cplusplus) */ - -#include - -int -main() -{ - fprintf(stderr, "Test N/A for this compiler environment.\n"); - return 0; -} - -#endif /* defined(__cplusplus) */ +/* + * File: exception3.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Test Synopsis: Test running of user supplied terminate() function. + * + * Test Method (Validation or Falsification): + * - + * + * Requirements Tested: + * - + * + * Features Tested: + * - + * + * Cases Tested: + * - + * + * Description: + * - + * + * Environment: + * - + * + * Input: + * - None. + * + * Output: + * - File name, Line number, and failed expression on failure. + * - No output on success. + * + * Assumptions: + * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock + * pthread_testcancel, pthread_cancel + * + * Pass Criteria: + * - Process returns zero exit status. + * + * Fail Criteria: + * - Process returns non-zero exit status. + */ + +#include "test.h" + +/* + * Note: Due to a buggy C++ runtime in Visual Studio 2005, when we are + * built with /MD and an unhandled exception occurs, the runtime does not + * properly call the terminate handler specified by set_terminate(). + */ +#if defined(__cplusplus) \ + && !(defined(_MSC_VER) && _MSC_VER == 1400 && defined(_DLL) && !defined(_DEBUG)) + +#if defined(_MSC_VER) +# include +#else +# if defined(__GNUC__) && __GNUC__ < 3 +# include +# else +# include + using std::set_terminate; +# endif +#endif + +/* + * Create NUMTHREADS threads in addition to the Main thread. + */ +enum { + NUMTHREADS = 10 +}; + +int caught = 0; +CRITICAL_SECTION caughtLock; + +void +terminateFunction () +{ + EnterCriticalSection(&caughtLock); + caught++; +#if 0 + { + FILE * fp = fopen("pthread.log", "a"); + fprintf(fp, "Caught = %d\n", caught); + fclose(fp); + } +#endif + LeaveCriticalSection(&caughtLock); + + /* + * Notes from the MSVC++ manual: + * 1) A term_func() should call exit(), otherwise + * abort() will be called on return to the caller. + * abort() raises SIGABRT. The default signal handler + * for all signals terminates the calling program with + * exit code 3. + * 2) A term_func() must not throw an exception. Dev: Therefore + * term_func() should not call pthread_exit() if an + * exception-using version of pthreads-win32 library + * is being used (i.e. either pthreadVCE or pthreadVSE). + */ + exit(0); +} + +void * +exceptionedThread(void * arg) +{ + int dummy = 0x1; + + set_terminate(&terminateFunction); + assert(set_terminate(&terminateFunction) == &terminateFunction); + + throw dummy; + + return (void *) 2; +} + +int +main() +{ + int i; + DWORD et[NUMTHREADS]; + + DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); + SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX); + + InitializeCriticalSection(&caughtLock); + + for (i = 0; i < NUMTHREADS; i++) + { + CreateThread(NULL, //Choose default security + 0, //Default stack size + (LPTHREAD_START_ROUTINE)&exceptionedThread, //Routine to execute + NULL, //Thread parameter + 0, //Immediately run the thread + &et[i] //Thread Id + ); + } + + Sleep(NUMTHREADS * 10); + + DeleteCriticalSection(&caughtLock); + /* + * Fail. Should never be reached. + */ + return 1; +} + +#else /* defined(__cplusplus) */ + +#include + +int +main() +{ + fprintf(stderr, "Test N/A for this compiler environment.\n"); + return 0; +} + +#endif /* defined(__cplusplus) */ diff --git a/tests/exit1.c b/tests/exit1.c index 35294245..e405ea78 100644 --- a/tests/exit1.c +++ b/tests/exit1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exit2.c b/tests/exit2.c index a534d477..60f37f15 100644 --- a/tests/exit2.c +++ b/tests/exit2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exit3.c b/tests/exit3.c index 13397200..0dfe2f3e 100644 --- a/tests/exit3.c +++ b/tests/exit3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exit4.c b/tests/exit4.c index e4138389..1395f896 100644 --- a/tests/exit4.c +++ b/tests/exit4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/exit5.c b/tests/exit5.c index b7b8ad7a..1c8b9e13 100644 --- a/tests/exit5.c +++ b/tests/exit5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/eyal1.c b/tests/eyal1.c index 5da95ff5..c80b2f0c 100644 --- a/tests/eyal1.c +++ b/tests/eyal1.c @@ -3,33 +3,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/inherit1.c b/tests/inherit1.c index d09cfc77..13fb2a89 100644 --- a/tests/inherit1.c +++ b/tests/inherit1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/join0.c b/tests/join0.c index f5c040eb..ea628d8a 100644 --- a/tests/join0.c +++ b/tests/join0.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/join1.c b/tests/join1.c index a0412791..d8a2549a 100644 --- a/tests/join1.c +++ b/tests/join1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/join2.c b/tests/join2.c index 8864f221..5ac6c571 100644 --- a/tests/join2.c +++ b/tests/join2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/join3.c b/tests/join3.c index 35368667..a3b6dd68 100644 --- a/tests/join3.c +++ b/tests/join3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/join4.c b/tests/join4.c index 3961dfeb..16aa34dc 100644 --- a/tests/join4.c +++ b/tests/join4.c @@ -1,81 +1,78 @@ -/* - * Test for pthread_timedjoin_np() timing out. - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Depends on API functions: pthread_create(). - */ - -#include "test.h" - -void * -func(void * arg) -{ - Sleep(1200); - return arg; -} - -int -main(int argc, char * argv[]) -{ - pthread_t id; - struct timespec abstime, reltime = { 1, 0 }; - void* result = (void*)-1; - - assert(pthread_create(&id, NULL, func, (void *)(size_t)999) == 0); - - /* - * Let thread start before we attempt to join it. - */ - Sleep(100); - - (void) pthread_win32_getabstime_np(&abstime, &reltime); - - /* Test for pthread_timedjoin_np timeout */ - assert(pthread_timedjoin_np(id, &result, &abstime) == ETIMEDOUT); - assert((int)(size_t)result == -1); - - /* Test for pthread_tryjoin_np behaviour before thread has exited */ - assert(pthread_tryjoin_np(id, &result) == EBUSY); - assert((int)(size_t)result == -1); - - Sleep(500); - - /* Test for pthread_tryjoin_np behaviour after thread has exited */ - assert(pthread_tryjoin_np(id, &result) == 0); - assert((int)(size_t)result == 999); - - /* Success. */ - return 0; -} +/* + * Test for pthread_timedjoin_np() timing out. + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Depends on API functions: pthread_create(). + */ + +#include "test.h" + +void * +func(void * arg) +{ + Sleep(1200); + return arg; +} + +int +main(int argc, char * argv[]) +{ + pthread_t id; + struct timespec abstime, reltime = { 1, 0 }; + void* result = (void*)-1; + + assert(pthread_create(&id, NULL, func, (void *)(size_t)999) == 0); + + /* + * Let thread start before we attempt to join it. + */ + Sleep(100); + + (void) pthread_win32_getabstime_np(&abstime, &reltime); + + /* Test for pthread_timedjoin_np timeout */ + assert(pthread_timedjoin_np(id, &result, &abstime) == ETIMEDOUT); + assert((int)(size_t)result == -1); + + /* Test for pthread_tryjoin_np behaviour before thread has exited */ + assert(pthread_tryjoin_np(id, &result) == EBUSY); + assert((int)(size_t)result == -1); + + Sleep(500); + + /* Test for pthread_tryjoin_np behaviour after thread has exited */ + assert(pthread_tryjoin_np(id, &result) == 0); + assert((int)(size_t)result == 999); + + /* Success. */ + return 0; +} diff --git a/tests/kill1.c b/tests/kill1.c index 84ca3c00..e9ef224b 100644 --- a/tests/kill1.c +++ b/tests/kill1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1.c b/tests/mutex1.c index 6d9beaf8..e2579796 100644 --- a/tests/mutex1.c +++ b/tests/mutex1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1e.c b/tests/mutex1e.c index 9d0a32ec..a9996519 100644 --- a/tests/mutex1e.c +++ b/tests/mutex1e.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1n.c b/tests/mutex1n.c index 7e306cfa..41d31168 100644 --- a/tests/mutex1n.c +++ b/tests/mutex1n.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex1r.c b/tests/mutex1r.c index fb2de7ea..83ead94b 100644 --- a/tests/mutex1r.c +++ b/tests/mutex1r.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex2.c b/tests/mutex2.c index 8bd490f3..eba52f20 100644 --- a/tests/mutex2.c +++ b/tests/mutex2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex2e.c b/tests/mutex2e.c index dd17ccd8..293ec135 100644 --- a/tests/mutex2e.c +++ b/tests/mutex2e.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex2r.c b/tests/mutex2r.c index 740d6073..3d1931a7 100644 --- a/tests/mutex2r.c +++ b/tests/mutex2r.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex3.c b/tests/mutex3.c index 94ca2dae..f21fb1f2 100644 --- a/tests/mutex3.c +++ b/tests/mutex3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex3e.c b/tests/mutex3e.c index 40911fc8..b27c1142 100644 --- a/tests/mutex3e.c +++ b/tests/mutex3e.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex3r.c b/tests/mutex3r.c index 891692b4..fa45d022 100644 --- a/tests/mutex3r.c +++ b/tests/mutex3r.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex4.c b/tests/mutex4.c index 220c2601..c04c91d6 100644 --- a/tests/mutex4.c +++ b/tests/mutex4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex5.c b/tests/mutex5.c index 6d123793..3fa14952 100644 --- a/tests/mutex5.c +++ b/tests/mutex5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6.c b/tests/mutex6.c index 08081010..dd76166d 100644 --- a/tests/mutex6.c +++ b/tests/mutex6.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6e.c b/tests/mutex6e.c index d6f69546..fb939ffc 100644 --- a/tests/mutex6e.c +++ b/tests/mutex6e.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6es.c b/tests/mutex6es.c index 6fa2424f..e9541cae 100644 --- a/tests/mutex6es.c +++ b/tests/mutex6es.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6n.c b/tests/mutex6n.c index e4681a5c..d55d926b 100644 --- a/tests/mutex6n.c +++ b/tests/mutex6n.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6r.c b/tests/mutex6r.c index 41fc6914..14439682 100644 --- a/tests/mutex6r.c +++ b/tests/mutex6r.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6rs.c b/tests/mutex6rs.c index d17566d7..cf69c098 100644 --- a/tests/mutex6rs.c +++ b/tests/mutex6rs.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex6s.c b/tests/mutex6s.c index 26dc0215..3522bce7 100644 --- a/tests/mutex6s.c +++ b/tests/mutex6s.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7.c b/tests/mutex7.c index ee3fe5c1..94766d39 100644 --- a/tests/mutex7.c +++ b/tests/mutex7.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7e.c b/tests/mutex7e.c index 1fc1a15f..76d76e95 100644 --- a/tests/mutex7e.c +++ b/tests/mutex7e.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7n.c b/tests/mutex7n.c index feca8ee2..145d68fe 100644 --- a/tests/mutex7n.c +++ b/tests/mutex7n.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex7r.c b/tests/mutex7r.c index 3e0ae135..3c046818 100644 --- a/tests/mutex7r.c +++ b/tests/mutex7r.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8.c b/tests/mutex8.c index d2ed686f..b12eb148 100644 --- a/tests/mutex8.c +++ b/tests/mutex8.c @@ -2,25 +2,30 @@ * mutex8.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Contact Email: rpj@ise.canberra.edu.au + * Homepage: https://sourceforge.net/projects/pthreads4w/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8e.c b/tests/mutex8e.c index 5cf2de68..b1e559ba 100644 --- a/tests/mutex8e.c +++ b/tests/mutex8e.c @@ -2,25 +2,30 @@ * mutex8e.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Contact Email: rpj@ise.canberra.edu.au + * Homepage: https://sourceforge.net/projects/pthreads4w/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8n.c b/tests/mutex8n.c index 0ea3cf32..dda005f6 100644 --- a/tests/mutex8n.c +++ b/tests/mutex8n.c @@ -2,25 +2,30 @@ * mutex8n.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Contact Email: rpj@ise.canberra.edu.au + * Homepage: https://sourceforge.net/projects/pthreads4w/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/mutex8r.c b/tests/mutex8r.c index 83673c1c..2a563993 100644 --- a/tests/mutex8r.c +++ b/tests/mutex8r.c @@ -2,25 +2,30 @@ * mutex8r.c * * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright (C) 1998 Ben Elliston and Ross Johnson - * Copyright (C) 1999,2000,2001 Ross Johnson + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Contact Email: rpj@ise.canberra.edu.au + * Homepage: https://sourceforge.net/projects/pthreads4w/ * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/name_np1.c b/tests/name_np1.c index b9c33224..9032525d 100644 --- a/tests/name_np1.c +++ b/tests/name_np1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/name_np2.c b/tests/name_np2.c index ae6c9ec7..fa3f0beb 100644 --- a/tests/name_np2.c +++ b/tests/name_np2.c @@ -1,110 +1,107 @@ -/* - * name_np2.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Description: - * Create a thread and give it a name. - * - * The MSVC version should display the thread name in the MSVS debugger. - * Confirmed for MSVS10 Express: - * - * VCExpress name_np1.exe /debugexe - * - * did indeed display the thread name in the trace output. - * - * Depends on API functions: - * pthread_create - * pthread_join - * pthread_self - * pthread_attr_init - * pthread_getname_np - * pthread_attr_setname_np - * pthread_barrier_init - * pthread_barrier_wait - */ - -#include "test.h" - -static int washere = 0; -static pthread_attr_t attr; -static pthread_barrier_t sync; -#if defined (__PTW32_COMPATIBILITY_BSD) -static int seqno = 0; -#endif - -void * func(void * arg) -{ - char buf[32]; - pthread_t self = pthread_self(); - - washere = 1; - pthread_barrier_wait(&sync); - assert(pthread_getname_np(self, buf, 32) == 0); - printf("Thread name: %s\n", buf); - pthread_barrier_wait(&sync); - - return 0; -} - -int -main() -{ - pthread_t t; - - assert(pthread_attr_init(&attr) == 0); -#if defined (__PTW32_COMPATIBILITY_BSD) - seqno++; - assert(pthread_attr_setname_np(&attr, "MyThread%d", (void *)&seqno) == 0); -#elif defined (__PTW32_COMPATIBILITY_TRU64) - assert(pthread_attr_setname_np(&attr, "MyThread1", NULL) == 0); -#else - assert(pthread_attr_setname_np(&attr, "MyThread1") == 0); -#endif - - assert(pthread_barrier_init(&sync, NULL, 2) == 0); - - assert(pthread_create(&t, &attr, func, NULL) == 0); - pthread_barrier_wait(&sync); - pthread_barrier_wait(&sync); - - assert(pthread_join(t, NULL) == 0); - - assert(pthread_barrier_destroy(&sync) == 0); - assert(pthread_attr_destroy(&attr) == 0); - - assert(washere == 1); - - return 0; -} +/* + * name_np2.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Description: + * Create a thread and give it a name. + * + * The MSVC version should display the thread name in the MSVS debugger. + * Confirmed for MSVS10 Express: + * + * VCExpress name_np1.exe /debugexe + * + * did indeed display the thread name in the trace output. + * + * Depends on API functions: + * pthread_create + * pthread_join + * pthread_self + * pthread_attr_init + * pthread_getname_np + * pthread_attr_setname_np + * pthread_barrier_init + * pthread_barrier_wait + */ + +#include "test.h" + +static int washere = 0; +static pthread_attr_t attr; +static pthread_barrier_t sync; +#if defined (__PTW32_COMPATIBILITY_BSD) +static int seqno = 0; +#endif + +void * func(void * arg) +{ + char buf[32]; + pthread_t self = pthread_self(); + + washere = 1; + pthread_barrier_wait(&sync); + assert(pthread_getname_np(self, buf, 32) == 0); + printf("Thread name: %s\n", buf); + pthread_barrier_wait(&sync); + + return 0; +} + +int +main() +{ + pthread_t t; + + assert(pthread_attr_init(&attr) == 0); +#if defined (__PTW32_COMPATIBILITY_BSD) + seqno++; + assert(pthread_attr_setname_np(&attr, "MyThread%d", (void *)&seqno) == 0); +#elif defined (__PTW32_COMPATIBILITY_TRU64) + assert(pthread_attr_setname_np(&attr, "MyThread1", NULL) == 0); +#else + assert(pthread_attr_setname_np(&attr, "MyThread1") == 0); +#endif + + assert(pthread_barrier_init(&sync, NULL, 2) == 0); + + assert(pthread_create(&t, &attr, func, NULL) == 0); + pthread_barrier_wait(&sync); + pthread_barrier_wait(&sync); + + assert(pthread_join(t, NULL) == 0); + + assert(pthread_barrier_destroy(&sync) == 0); + assert(pthread_attr_destroy(&attr) == 0); + + assert(washere == 1); + + return 0; +} diff --git a/tests/once1.c b/tests/once1.c index 3a7f2e8c..68afc821 100644 --- a/tests/once1.c +++ b/tests/once1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/once2.c b/tests/once2.c index ffd6bfe1..d5dc8fd1 100644 --- a/tests/once2.c +++ b/tests/once2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/once3.c b/tests/once3.c index 4486f34f..d21529bb 100644 --- a/tests/once3.c +++ b/tests/once3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/once4.c b/tests/once4.c index 39feea94..5f57426c 100644 --- a/tests/once4.c +++ b/tests/once4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/priority1.c b/tests/priority1.c index d77420f8..292fed4c 100644 --- a/tests/priority1.c +++ b/tests/priority1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/priority2.c b/tests/priority2.c index c4552e62..fca0b4c7 100644 --- a/tests/priority2.c +++ b/tests/priority2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/reuse1.c b/tests/reuse1.c index bcf8571c..0c8ff218 100644 --- a/tests/reuse1.c +++ b/tests/reuse1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/reuse2.c b/tests/reuse2.c index 93643b90..9ae44fdf 100644 --- a/tests/reuse2.c +++ b/tests/reuse2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/robust1.c b/tests/robust1.c index 4bb479ac..74976e66 100755 --- a/tests/robust1.c +++ b/tests/robust1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/robust2.c b/tests/robust2.c index 795a17ff..eae452ed 100755 --- a/tests/robust2.c +++ b/tests/robust2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/robust3.c b/tests/robust3.c index e9d05c7d..b5fda18a 100755 --- a/tests/robust3.c +++ b/tests/robust3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/robust4.c b/tests/robust4.c index 35d5b84f..182aabc0 100755 --- a/tests/robust4.c +++ b/tests/robust4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/robust5.c b/tests/robust5.c index 82e592e9..4a51c155 100755 --- a/tests/robust5.c +++ b/tests/robust5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/runorder.mk b/tests/runorder.mk index 37f6e988..8c7cd73f 100644 --- a/tests/runorder.mk +++ b/tests/runorder.mk @@ -1,159 +1,159 @@ -# -# Common rules that define the run order of tests -# -benchtest1.bench: -benchtest2.bench: -benchtest3.bench: -benchtest4.bench: -benchtest5.bench: - -affinity1.pass: -affinity2.pass: affinity1.pass -affinity3.pass: affinity2.pass self1.pass create3.pass -affinity4.pass: affinity3.pass -affinity5.pass: affinity4.pass -affinity6.pass: affinity5.pass -barrier1.pass: semaphore4.pass -barrier2.pass: barrier1.pass semaphore4.pass -barrier3.pass: barrier2.pass semaphore4.pass self1.pass create3.pass join4.pass -barrier4.pass: barrier3.pass semaphore4.pass self1.pass create3.pass join4.pass mutex8.pass -barrier5.pass: barrier4.pass semaphore4.pass self1.pass create3.pass join4.pass mutex8.pass -barrier6.pass: barrier5.pass semaphore4.pass self1.pass create3.pass join4.pass mutex8.pass -cancel1.pass: self1.pass create3.pass -cancel2.pass: self1.pass create3.pass join4.pass barrier6.pass -cancel3.pass: self1.pass create3.pass join4.pass context1.pass -cancel4.pass: cancel3.pass self1.pass create3.pass join4.pass -cancel5.pass: cancel3.pass self1.pass create3.pass join4.pass -cancel6a.pass: cancel3.pass self1.pass create3.pass join4.pass -cancel6d.pass: cancel3.pass self1.pass create3.pass join4.pass -cancel7.pass: self1.pass create3.pass join4.pass kill1.pass -cancel8.pass: cancel7.pass self1.pass mutex8.pass kill1.pass -cancel9.pass: cancel8.pass self1.pass create3.pass join4.pass mutex8.pass kill1.pass -cleanup0.pass: self1.pass create3.pass join4.pass mutex8.pass cancel5.pass -cleanup1.pass: cleanup0.pass -cleanup2.pass: cleanup1.pass -cleanup3.pass: cleanup2.pass -condvar1.pass: self1.pass create3.pass semaphore1.pass mutex8.pass -condvar1_1.pass: condvar1.pass -condvar1_2.pass: join2.pass -condvar2.pass: condvar1.pass -condvar2_1.pass: condvar2.pass join2.pass -condvar3.pass: create1.pass condvar2.pass -condvar3_1.pass: condvar3.pass join2.pass -condvar3_2.pass: condvar3_1.pass -condvar3_3.pass: condvar3_2.pass -condvar4.pass: create1.pass -condvar5.pass: condvar4.pass -condvar6.pass: condvar5.pass -condvar7.pass: condvar6.pass cleanup1.pass -condvar8.pass: condvar7.pass -condvar9.pass: condvar8.pass -context1.pass: cancel1.pass -count1.pass: join1.pass -create1.pass: mutex2.pass -create2.pass: create1.pass -create3.pass: create2.pass -delay1.pass: self1.pass create3.pass -delay2.pass: delay1.pass -detach1.pass: join0.pass -equal1.pass: self1.pass create1.pass -errno1.pass: mutex3.pass -exception1.pass: cancel4.pass -exception2.pass: exception1.pass -exception3_0.pass: exception2.pass -exception3.pass: exception3_0.pass -exit1.pass: self1.pass create3.pass -exit2.pass: create1.pass -exit3.pass: create1.pass -exit4.pass: self1.pass create3.pass -exit5.pass: exit4.pass kill1.pass -exit6.pass: exit5.pass -eyal1.pass: self1.pass create3.pass mutex8.pass tsd1.pass -inherit1.pass: join1.pass priority1.pass -join0.pass: create1.pass -join1.pass: create1.pass -join2.pass: create1.pass -join3.pass: join2.pass -join4.pass: join3.pass -kill1.pass: self1.pass -mutex1.pass: mutex5.pass -mutex1n.pass: mutex1.pass -mutex1e.pass: mutex1.pass -mutex1r.pass: mutex1.pass -mutex2.pass: mutex1.pass -mutex2r.pass: mutex2.pass -mutex2e.pass: mutex2.pass -mutex3.pass: create1.pass -mutex3r.pass: mutex3.pass -mutex3e.pass: mutex3.pass -mutex4.pass: mutex3.pass -mutex5.pass: sizes.pass -mutex6.pass: mutex4.pass -mutex6n.pass: mutex4.pass -mutex6e.pass: mutex4.pass -mutex6r.pass: mutex4.pass -mutex6s.pass: mutex6.pass -mutex6rs.pass: mutex6r.pass -mutex6es.pass: mutex6e.pass -mutex7.pass: mutex6.pass -mutex7n.pass: mutex6n.pass -mutex7e.pass: mutex6e.pass -mutex7r.pass: mutex6r.pass -mutex8.pass: mutex7.pass -mutex8n.pass: mutex7n.pass -mutex8e.pass: mutex7e.pass -mutex8r.pass: mutex7r.pass -name_np1.pass: join4.pass barrier6.pass -name_np2.pass: name_np1.pass -once1.pass: create1.pass -once2.pass: once1.pass -once3.pass: once2.pass -once4.pass: once3.pass -priority1.pass: join1.pass -priority2.pass: priority1.pass barrier3.pass -reinit1.pass: rwlock7.pass -reuse1.pass: create3.pass -reuse2.pass: reuse1.pass -robust1.pass: mutex8r.pass -robust2.pass: mutex8r.pass -robust3.pass: robust2.pass -robust4.pass: robust3.pass -robust5.pass: robust4.pass -rwlock1.pass: condvar6.pass -rwlock2.pass: rwlock1.pass -rwlock3.pass: rwlock2.pass join2.pass -rwlock4.pass: rwlock3.pass -rwlock5.pass: rwlock4.pass -rwlock6.pass: rwlock5.pass -rwlock7.pass: rwlock6.pass -rwlock7_1.pass: rwlock7.pass -rwlock8.pass: rwlock7.pass -rwlock8_1.pass: rwlock8.pass -rwlock2_t.pass: rwlock2.pass -rwlock3_t.pass: rwlock2_t.pass -rwlock4_t.pass: rwlock3_t.pass -rwlock5_t.pass: rwlock4_t.pass -rwlock6_t.pass: rwlock5_t.pass -rwlock6_t2.pass: rwlock6_t.pass -self1.pass: sizes.pass -self2.pass: self1.pass equal1.pass create1.pass -semaphore1.pass: sizes.pass -semaphore2.pass: semaphore1.pass -semaphore3.pass: semaphore2.pass -semaphore4.pass: semaphore3.pass cancel1.pass -semaphore4t.pass: semaphore4.pass -semaphore5.pass: semaphore4.pass -sequence1.pass: reuse2.pass -sizes.pass: -spin1.pass: self1.pass create3.pass mutex8.pass -spin2.pass: spin1.pass -spin3.pass: spin2.pass -spin4.pass: spin3.pass -stress1.pass: create3.pass mutex8.pass barrier6.pass -threestage.pass: stress1.pass -timeouts.pass: condvar9.pass -tsd1.pass: barrier5.pass join1.pass -tsd2.pass: tsd1.pass -tsd3.pass: tsd2.pass -valid1.pass: join1.pass -valid2.pass: valid1.pass +# +# Common rules that define the run order of tests +# +benchtest1.bench: +benchtest2.bench: +benchtest3.bench: +benchtest4.bench: +benchtest5.bench: + +affinity1.pass: +affinity2.pass: affinity1.pass +affinity3.pass: affinity2.pass self1.pass create3.pass +affinity4.pass: affinity3.pass +affinity5.pass: affinity4.pass +affinity6.pass: affinity5.pass +barrier1.pass: semaphore4.pass +barrier2.pass: barrier1.pass semaphore4.pass +barrier3.pass: barrier2.pass semaphore4.pass self1.pass create3.pass join4.pass +barrier4.pass: barrier3.pass semaphore4.pass self1.pass create3.pass join4.pass mutex8.pass +barrier5.pass: barrier4.pass semaphore4.pass self1.pass create3.pass join4.pass mutex8.pass +barrier6.pass: barrier5.pass semaphore4.pass self1.pass create3.pass join4.pass mutex8.pass +cancel1.pass: self1.pass create3.pass +cancel2.pass: self1.pass create3.pass join4.pass barrier6.pass +cancel3.pass: self1.pass create3.pass join4.pass context1.pass +cancel4.pass: cancel3.pass self1.pass create3.pass join4.pass +cancel5.pass: cancel3.pass self1.pass create3.pass join4.pass +cancel6a.pass: cancel3.pass self1.pass create3.pass join4.pass +cancel6d.pass: cancel3.pass self1.pass create3.pass join4.pass +cancel7.pass: self1.pass create3.pass join4.pass kill1.pass +cancel8.pass: cancel7.pass self1.pass mutex8.pass kill1.pass +cancel9.pass: cancel8.pass self1.pass create3.pass join4.pass mutex8.pass kill1.pass +cleanup0.pass: self1.pass create3.pass join4.pass mutex8.pass cancel5.pass +cleanup1.pass: cleanup0.pass +cleanup2.pass: cleanup1.pass +cleanup3.pass: cleanup2.pass +condvar1.pass: self1.pass create3.pass semaphore1.pass mutex8.pass +condvar1_1.pass: condvar1.pass +condvar1_2.pass: join2.pass +condvar2.pass: condvar1.pass +condvar2_1.pass: condvar2.pass join2.pass +condvar3.pass: create1.pass condvar2.pass +condvar3_1.pass: condvar3.pass join2.pass +condvar3_2.pass: condvar3_1.pass +condvar3_3.pass: condvar3_2.pass +condvar4.pass: create1.pass +condvar5.pass: condvar4.pass +condvar6.pass: condvar5.pass +condvar7.pass: condvar6.pass cleanup1.pass +condvar8.pass: condvar7.pass +condvar9.pass: condvar8.pass +context1.pass: cancel1.pass +count1.pass: join1.pass +create1.pass: mutex2.pass +create2.pass: create1.pass +create3.pass: create2.pass +delay1.pass: self1.pass create3.pass +delay2.pass: delay1.pass +detach1.pass: join0.pass +equal1.pass: self1.pass create1.pass +errno1.pass: mutex3.pass +exception1.pass: cancel4.pass +exception2.pass: exception1.pass +exception3_0.pass: exception2.pass +exception3.pass: exception3_0.pass +exit1.pass: self1.pass create3.pass +exit2.pass: create1.pass +exit3.pass: create1.pass +exit4.pass: self1.pass create3.pass +exit5.pass: exit4.pass kill1.pass +exit6.pass: exit5.pass +eyal1.pass: self1.pass create3.pass mutex8.pass tsd1.pass +inherit1.pass: join1.pass priority1.pass +join0.pass: create1.pass +join1.pass: create1.pass +join2.pass: create1.pass +join3.pass: join2.pass +join4.pass: join3.pass +kill1.pass: self1.pass +mutex1.pass: mutex5.pass +mutex1n.pass: mutex1.pass +mutex1e.pass: mutex1.pass +mutex1r.pass: mutex1.pass +mutex2.pass: mutex1.pass +mutex2r.pass: mutex2.pass +mutex2e.pass: mutex2.pass +mutex3.pass: create1.pass +mutex3r.pass: mutex3.pass +mutex3e.pass: mutex3.pass +mutex4.pass: mutex3.pass +mutex5.pass: sizes.pass +mutex6.pass: mutex4.pass +mutex6n.pass: mutex4.pass +mutex6e.pass: mutex4.pass +mutex6r.pass: mutex4.pass +mutex6s.pass: mutex6.pass +mutex6rs.pass: mutex6r.pass +mutex6es.pass: mutex6e.pass +mutex7.pass: mutex6.pass +mutex7n.pass: mutex6n.pass +mutex7e.pass: mutex6e.pass +mutex7r.pass: mutex6r.pass +mutex8.pass: mutex7.pass +mutex8n.pass: mutex7n.pass +mutex8e.pass: mutex7e.pass +mutex8r.pass: mutex7r.pass +name_np1.pass: join4.pass barrier6.pass +name_np2.pass: name_np1.pass +once1.pass: create1.pass +once2.pass: once1.pass +once3.pass: once2.pass +once4.pass: once3.pass +priority1.pass: join1.pass +priority2.pass: priority1.pass barrier3.pass +reinit1.pass: rwlock7.pass +reuse1.pass: create3.pass +reuse2.pass: reuse1.pass +robust1.pass: mutex8r.pass +robust2.pass: mutex8r.pass +robust3.pass: robust2.pass +robust4.pass: robust3.pass +robust5.pass: robust4.pass +rwlock1.pass: condvar6.pass +rwlock2.pass: rwlock1.pass +rwlock3.pass: rwlock2.pass join2.pass +rwlock4.pass: rwlock3.pass +rwlock5.pass: rwlock4.pass +rwlock6.pass: rwlock5.pass +rwlock7.pass: rwlock6.pass +rwlock7_1.pass: rwlock7.pass +rwlock8.pass: rwlock7.pass +rwlock8_1.pass: rwlock8.pass +rwlock2_t.pass: rwlock2.pass +rwlock3_t.pass: rwlock2_t.pass +rwlock4_t.pass: rwlock3_t.pass +rwlock5_t.pass: rwlock4_t.pass +rwlock6_t.pass: rwlock5_t.pass +rwlock6_t2.pass: rwlock6_t.pass +self1.pass: sizes.pass +self2.pass: self1.pass equal1.pass create1.pass +semaphore1.pass: sizes.pass +semaphore2.pass: semaphore1.pass +semaphore3.pass: semaphore2.pass +semaphore4.pass: semaphore3.pass cancel1.pass +semaphore4t.pass: semaphore4.pass +semaphore5.pass: semaphore4.pass +sequence1.pass: reuse2.pass +sizes.pass: +spin1.pass: self1.pass create3.pass mutex8.pass +spin2.pass: spin1.pass +spin3.pass: spin2.pass +spin4.pass: spin3.pass +stress1.pass: create3.pass mutex8.pass barrier6.pass +threestage.pass: stress1.pass +timeouts.pass: condvar9.pass +tsd1.pass: barrier5.pass join1.pass +tsd2.pass: tsd1.pass +tsd3.pass: tsd2.pass +valid1.pass: join1.pass +valid2.pass: valid1.pass diff --git a/tests/rwlock1.c b/tests/rwlock1.c index e76e920e..63a321f1 100644 --- a/tests/rwlock1.c +++ b/tests/rwlock1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock2.c b/tests/rwlock2.c index e9aff324..1ab766f5 100644 --- a/tests/rwlock2.c +++ b/tests/rwlock2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock2_t.c b/tests/rwlock2_t.c index d6a96713..82a0581b 100644 --- a/tests/rwlock2_t.c +++ b/tests/rwlock2_t.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock3.c b/tests/rwlock3.c index 08bda6e2..0eeafec6 100644 --- a/tests/rwlock3.c +++ b/tests/rwlock3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock3_t.c b/tests/rwlock3_t.c index 9076496e..11400053 100644 --- a/tests/rwlock3_t.c +++ b/tests/rwlock3_t.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock4.c b/tests/rwlock4.c index b1ff7e0e..473b8119 100644 --- a/tests/rwlock4.c +++ b/tests/rwlock4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock4_t.c b/tests/rwlock4_t.c index bc871b83..79bcd3a7 100644 --- a/tests/rwlock4_t.c +++ b/tests/rwlock4_t.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock5.c b/tests/rwlock5.c index 2d6e80cc..331ad7d2 100644 --- a/tests/rwlock5.c +++ b/tests/rwlock5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock5_t.c b/tests/rwlock5_t.c index 03e6c295..7651fe44 100644 --- a/tests/rwlock5_t.c +++ b/tests/rwlock5_t.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock6.c b/tests/rwlock6.c index af523b44..6e31be1d 100644 --- a/tests/rwlock6.c +++ b/tests/rwlock6.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock6_t.c b/tests/rwlock6_t.c index b33cd480..aad34a6a 100644 --- a/tests/rwlock6_t.c +++ b/tests/rwlock6_t.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/rwlock6_t2.c b/tests/rwlock6_t2.c index 279ca770..5aaa0ad6 100644 --- a/tests/rwlock6_t2.c +++ b/tests/rwlock6_t2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/self1.c b/tests/self1.c index 3278dc02..145e9e08 100644 --- a/tests/self1.c +++ b/tests/self1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/self2.c b/tests/self2.c index 3fff003d..cf8fce5d 100644 --- a/tests/self2.c +++ b/tests/self2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore1.c b/tests/semaphore1.c index 91d875f1..f623dc7a 100644 --- a/tests/semaphore1.c +++ b/tests/semaphore1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore2.c b/tests/semaphore2.c index de56cb31..9b10a6a5 100644 --- a/tests/semaphore2.c +++ b/tests/semaphore2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore3.c b/tests/semaphore3.c index 810d6777..b76ed2f5 100644 --- a/tests/semaphore3.c +++ b/tests/semaphore3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore4.c b/tests/semaphore4.c index eab1d890..4166dff5 100644 --- a/tests/semaphore4.c +++ b/tests/semaphore4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore4t.c b/tests/semaphore4t.c index acc7985d..11cac910 100644 --- a/tests/semaphore4t.c +++ b/tests/semaphore4t.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/semaphore5.c b/tests/semaphore5.c index 5ebcb35c..ee967da3 100644 --- a/tests/semaphore5.c +++ b/tests/semaphore5.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/sequence1.c b/tests/sequence1.c index 51c3da7c..b10030cc 100755 --- a/tests/sequence1.c +++ b/tests/sequence1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/spin1.c b/tests/spin1.c index 82af2ca7..881a7913 100644 --- a/tests/spin1.c +++ b/tests/spin1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/spin2.c b/tests/spin2.c index 267cd5c3..e8d61825 100644 --- a/tests/spin2.c +++ b/tests/spin2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/spin3.c b/tests/spin3.c index e5a89cf5..fbc8d7c0 100644 --- a/tests/spin3.c +++ b/tests/spin3.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/spin4.c b/tests/spin4.c index f602810d..f9a42c99 100644 --- a/tests/spin4.c +++ b/tests/spin4.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/stress1.c b/tests/stress1.c index 333b5d7f..c6be04fe 100644 --- a/tests/stress1.c +++ b/tests/stress1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/test.h b/tests/test.h index 2df922e8..1a78c4da 100644 --- a/tests/test.h +++ b/tests/test.h @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * */ diff --git a/tests/threestage.c b/tests/threestage.c index 8443f1f7..cd607f0d 100644 --- a/tests/threestage.c +++ b/tests/threestage.c @@ -1,583 +1,583 @@ -/* - This source code is taken directly from examples in the book - Windows System Programming, Edition 4 by Johnson (John) Hart - - Session 6, Chapter 10. ThreeStage.c - - Several required additional header and source files from the - book examples have been included inline to simplify building. - The only modification to the code has been to provide default - values when run without arguments. - - Three-stage Producer Consumer system - Other files required in this project, either directly or - in the form of libraries (DLLs are preferable) - QueueObj.c (inlined here) - Messages.c (inlined here) - - Usage: ThreeStage npc goal [display] - start up "npc" paired producer and consumer threads. - Display messages if "display" is non-zero - Each producer must produce a total of - "goal" messages, where each message is tagged - with the consumer that should receive it - Messages are sent to a "transmitter thread" which performs - additional processing before sending message groups to the - "receiver thread." Finally, the receiver thread sends - the messages to the consumer threads. - - Transmitter: Receive messages one at a time from producers, - create a transmission message of up to "TBLOCK_SIZE" messages - to be sent to the Receiver. (this could be a network xfer - Receiver: Take message blocks sent by the Transmitter - and send the individual messages to the designated consumer - */ - -/* Suppress warning re use of ctime() */ -#define _CRT_SECURE_NO_WARNINGS 1 - -#include "test.h" -#define sleep(i) Sleep(i*1000) -#ifndef max -#define max(a,b) ((a) > (b) ? (a) : (b)) -#endif - -#define DATA_SIZE 256 -typedef struct msg_block_tag { /* Message block */ - pthread_mutex_t mguard; /* Mutex for the message block */ - pthread_cond_t mconsumed; /* Event: Message consumed; */ - /* Produce a new one or stop */ - pthread_cond_t mready; /* Event: Message ready */ - /* - * Note: the mutex and events are not used by some programs, such - * as Program 10-3, 4, 5 (the multi-stage pipeline) as the messages - * are part of a protected queue - */ - volatile unsigned int source; /* Creating producer identity */ - volatile unsigned int destination;/* Identity of receiving thread*/ - - volatile unsigned int f_consumed; - volatile unsigned int f_ready; - volatile unsigned int f_stop; - /* Consumed & ready state flags, stop flag */ - volatile unsigned int sequence; /* Message block sequence number */ - time_t timestamp; - unsigned int checksum; /* Message contents checksum */ - unsigned int data[DATA_SIZE]; /* Message Contents */ -} msg_block_t; - -void message_fill (msg_block_t *, unsigned int, unsigned int, unsigned int); -void message_display (msg_block_t *); - -#define CV_TIMEOUT 5 /* tunable parameter for the CV model */ - - -/* - Definitions of a synchronized, general bounded queue structure. - Queues are implemented as arrays with indices to youngest - and oldest messages, with wrap around. - Each queue also contains a guard mutex and - "not empty" and "not full" condition variables. - Finally, there is a pointer to an array of messages of - arbitrary type - */ - -typedef struct queue_tag { /* General purpose queue */ - pthread_mutex_t q_guard;/* Guard the message block */ - pthread_cond_t q_ne; /* Event: Queue is not empty */ - pthread_cond_t q_nf; /* Event: Queue is not full */ - /* These two events are manual-reset for the broadcast model - * and auto-reset for the signal model */ - volatile unsigned int q_size; /* Queue max size size */ - volatile unsigned int q_first; /* Index of oldest message */ - volatile unsigned int q_last; /* Index of youngest msg */ - volatile unsigned int q_destroyed;/* Q receiver has terminated */ - void * msg_array; /* array of q_size messages */ -} queue_t; - -/* Queue management functions */ -unsigned int q_initialize (queue_t *, unsigned int, unsigned int); -unsigned int q_destroy (queue_t *); -unsigned int q_destroyed (queue_t *); -unsigned int q_empty (queue_t *); -unsigned int q_full (queue_t *); -unsigned int q_get (queue_t *, void *, unsigned int, unsigned int); -unsigned int q_put (queue_t *, void *, unsigned int, unsigned int); -unsigned int q_remove (queue_t *, void *, unsigned int); -unsigned int q_insert (queue_t *, void *, unsigned int); - -#include -#include -#include - -#define DELAY_COUNT 1000 -#define MAX_THREADS 1024 - -/* Queue lengths and blocking factors. These numbers are arbitrary and */ -/* can be adjusted for performance tuning. The current values are */ -/* not well balanced. */ - -#define TBLOCK_SIZE 5 /* Transmitter combines this many messages at at time */ -#define Q_TIMEOUT 2000 /* Transmiter and receiver timeout (ms) waiting for messages */ -//#define Q_TIMEOUT INFINITE -#define MAX_RETRY 5 /* Number of q_get retries before quitting */ -#define P2T_QLEN 10 /* Producer to Transmitter queue length */ -#define T2R_QLEN 4 /* Transmitter to Receiver queue length */ -#define R2C_QLEN 4 /* Receiver to Consumer queue length - there is one - * such queue for each consumer */ - -void * producer (void *); -void * consumer (void *); -void * transmitter (void *); -void * receiver (void *); - - -typedef struct _THARG { - volatile unsigned int thread_number; - volatile unsigned int work_goal; /* used by producers */ - volatile unsigned int work_done; /* Used by producers and consumers */ -} THARG; - - -/* Grouped messages sent by the transmitter to receiver */ -typedef struct T2R_MSG_TYPEag { - volatile unsigned int num_msgs; /* Number of messages contained */ - msg_block_t messages [TBLOCK_SIZE]; -} T2R_MSG_TYPE; - -queue_t p2tq, t2rq, *r2cq_array; - -/* ShutDown, AllProduced are global flags to shut down the system & transmitter */ -static volatile unsigned int ShutDown = 0; -static volatile unsigned int AllProduced = 0; -static unsigned int DisplayMessages = 0; - -int main (int argc, char * argv[]) -{ - unsigned int tstatus = 0, nthread, ithread, goal, thid; - pthread_t *producer_th, *consumer_th, transmitter_th, receiver_th; - THARG *producer_arg, *consumer_arg; - - if (argc < 3) { - nthread = 32; - goal = 1000; - } else { - nthread = atoi(argv[1]); - goal = atoi(argv[2]); - if (argc >= 4) - DisplayMessages = atoi(argv[3]); - } - - srand ((int)time(NULL)); /* Seed the RN generator */ - - if (nthread > MAX_THREADS) { - printf ("Maximum number of producers or consumers is %d.\n", MAX_THREADS); - return 2; - } - producer_th = (pthread_t *) malloc (nthread * sizeof(pthread_t)); - producer_arg = (THARG *) calloc (nthread, sizeof (THARG)); - consumer_th = (pthread_t *) malloc (nthread * sizeof(pthread_t)); - consumer_arg = (THARG *) calloc (nthread, sizeof (THARG)); - - if (producer_th == NULL || producer_arg == NULL - || consumer_th == NULL || consumer_arg == NULL) - perror ("Cannot allocate working memory for threads."); - - q_initialize (&p2tq, sizeof(msg_block_t), P2T_QLEN); - q_initialize (&t2rq, sizeof(T2R_MSG_TYPE), T2R_QLEN); - /* Allocate and initialize Receiver to Consumer queue for each consumer */ - r2cq_array = (queue_t *) calloc (nthread, sizeof(queue_t)); - if (r2cq_array == NULL) perror ("Cannot allocate memory for r2c queues"); - - for (ithread = 0; ithread < nthread; ithread++) { - /* Initialize r2c queue for this consumer thread */ - q_initialize (&r2cq_array[ithread], sizeof(msg_block_t), R2C_QLEN); - /* Fill in the thread arg */ - consumer_arg[ithread].thread_number = ithread; - consumer_arg[ithread].work_goal = goal; - consumer_arg[ithread].work_done = 0; - - tstatus = pthread_create (&consumer_th[ithread], NULL, - consumer, (void *)&consumer_arg[ithread]); - if (tstatus != 0) - perror ("Cannot create consumer thread"); - - producer_arg[ithread].thread_number = ithread; - producer_arg[ithread].work_goal = goal; - producer_arg[ithread].work_done = 0; - tstatus = pthread_create (&producer_th[ithread], NULL, - producer, (void *)&producer_arg[ithread]); - if (tstatus != 0) - perror ("Cannot create producer thread"); - } - - tstatus = pthread_create (&transmitter_th, NULL, transmitter, &thid); - if (tstatus != 0) - perror ("Cannot create tranmitter thread"); - tstatus = pthread_create (&receiver_th, NULL, receiver, &thid); - if (tstatus != 0) - perror ("Cannot create receiver thread"); - - - printf ("BOSS: All threads are running\n"); - /* Wait for the producers to complete */ - /* The implementation allows too many threads for WaitForMultipleObjects */ - /* although you could call WFMO in a loop */ - for (ithread = 0; ithread < nthread; ithread++) { - tstatus = pthread_join (producer_th[ithread], NULL); - if (tstatus != 0) - perror ("Cannot wait for producer thread"); - printf ("BOSS: Producer %d produced %d work units\n", - ithread, producer_arg[ithread].work_done); - } - /* Producers have completed their work. */ - printf ("BOSS: All producers have completed their work.\n"); - AllProduced = 1; - - /* Wait for the consumers to complete */ - for (ithread = 0; ithread < nthread; ithread++) { - tstatus = pthread_join (consumer_th[ithread], NULL); - if (tstatus != 0) - perror ("Cannot wait for consumer thread"); - printf ("BOSS: consumer %d consumed %d work units\n", - ithread, consumer_arg[ithread].work_done); - } - printf ("BOSS: All consumers have completed their work.\n"); - - ShutDown = 1; /* Set a shutdown flag - All messages have been consumed */ - - /* Wait for the transmitter and receiver */ - - tstatus = pthread_join (transmitter_th, NULL); - if (tstatus != 0) - perror ("Failed waiting for transmitter"); - tstatus = pthread_join (receiver_th, NULL); - if (tstatus != 0) - perror ("Failed waiting for receiver"); - - q_destroy (&p2tq); - q_destroy (&t2rq); - for (ithread = 0; ithread < nthread; ithread++) - q_destroy (&r2cq_array[ithread]); - free (r2cq_array); - free (producer_th); - free (consumer_th); - free (producer_arg); - free(consumer_arg); - printf ("System has finished. Shutting down\n"); - return 0; -} - -void * producer (void * arg) -{ - THARG * parg; - unsigned int ithread, tstatus = 0; - msg_block_t msg; - - parg = (THARG *)arg; - ithread = parg->thread_number; - - while (parg->work_done < parg->work_goal && !ShutDown) { - /* Periodically produce work units until the goal is satisfied */ - /* messages receive a source and destination address which are */ - /* the same in this case but could, in general, be different. */ - sleep (rand()/100000000); - message_fill (&msg, ithread, ithread, parg->work_done); - - /* put the message in the queue - Use an infinite timeout to assure - * that the message is inserted, even if consumers are delayed */ - tstatus = q_put (&p2tq, &msg, sizeof(msg), INFINITE); - if (0 == tstatus) { - parg->work_done++; - } - } - - return 0; -} - -void * consumer (void * arg) -{ - THARG * carg; - unsigned int tstatus = 0, ithread, Retries = 0; - msg_block_t msg; - queue_t *pr2cq; - - carg = (THARG *) arg; - ithread = carg->thread_number; - - carg = (THARG *)arg; - pr2cq = &r2cq_array[ithread]; - - while (carg->work_done < carg->work_goal && Retries < MAX_RETRY && !ShutDown) { - /* Receive and display/process messages */ - /* Try to receive the requested number of messages, - * but allow for early system shutdown */ - - tstatus = q_get (pr2cq, &msg, sizeof(msg), Q_TIMEOUT); - if (0 == tstatus) { - if (DisplayMessages > 0) message_display (&msg); - carg->work_done++; - Retries = 0; - } else { - Retries++; - } - } - - return NULL; -} - -void * transmitter (void * arg) -{ - - /* Obtain multiple producer messages, combining into a single */ - /* compound message for the receiver */ - - unsigned int tstatus = 0, im, Retries = 0; - T2R_MSG_TYPE t2r_msg = {0}; - msg_block_t p2t_msg; - - while (!ShutDown && !AllProduced) { - t2r_msg.num_msgs = 0; - /* pack the messages for transmission to the receiver */ - im = 0; - while (im < TBLOCK_SIZE && !ShutDown && Retries < MAX_RETRY && !AllProduced) { - tstatus = q_get (&p2tq, &p2t_msg, sizeof(p2t_msg), Q_TIMEOUT); - if (0 == tstatus) { - memcpy (&t2r_msg.messages[im], &p2t_msg, sizeof(p2t_msg)); - t2r_msg.num_msgs++; - im++; - Retries = 0; - } else { /* Timed out. */ - Retries++; - } - } - tstatus = q_put (&t2rq, &t2r_msg, sizeof(t2r_msg), INFINITE); - if (tstatus != 0) return NULL; - } - return NULL; -} - - -void * receiver (void * arg) -{ - /* Obtain compound messages from the transmitter and unblock them */ - /* and transmit to the designated consumer. */ - - unsigned int tstatus = 0, im, ic, Retries = 0; - T2R_MSG_TYPE t2r_msg; - msg_block_t r2c_msg; - - while (!ShutDown && Retries < MAX_RETRY) { - tstatus = q_get (&t2rq, &t2r_msg, sizeof(t2r_msg), Q_TIMEOUT); - if (tstatus != 0) { /* Timeout - Have the producers shut down? */ - Retries++; - continue; - } - Retries = 0; - /* Distribute the packaged messages to the proper consumer */ - im = 0; - while (im < t2r_msg.num_msgs) { - memcpy (&r2c_msg, &t2r_msg.messages[im], sizeof(r2c_msg)); - ic = r2c_msg.destination; /* Destination consumer */ - tstatus = q_put (&r2cq_array[ic], &r2c_msg, sizeof(r2c_msg), INFINITE); - if (0 == tstatus) im++; - } - } - return NULL; -} - -#if (!defined INFINITE) -#define INFINITE 0xFFFFFFFF -#endif - -/* - Finite bounded queue management functions - q_get, q_put timeouts (max_wait) are in ms - convert to sec, rounding up - */ -unsigned int q_get (queue_t *q, void * msg, unsigned int msize, unsigned int MaxWait) -{ - int tstatus = 0, got_msg = 0, time_inc = (MaxWait + 999) /1000; - struct timespec timeout; - timeout.tv_nsec = 0; - - if (q_destroyed(q)) return 1; - pthread_mutex_lock (&q->q_guard); - while (q_empty (q) && 0 == tstatus) { - if (MaxWait != INFINITE) { - timeout.tv_sec = time(NULL) + time_inc; - tstatus = pthread_cond_timedwait (&q->q_ne, &q->q_guard, &timeout); - } else { - tstatus = pthread_cond_wait (&q->q_ne, &q->q_guard); - } - } - /* remove the message, if any, from the queue */ - if (0 == tstatus && !q_empty (q)) { - q_remove (q, msg, msize); - got_msg = 1; - /* Signal that the queue is not full as we've removed a message */ - pthread_cond_broadcast (&q->q_nf); - } - pthread_mutex_unlock (&q->q_guard); - return (0 == tstatus && got_msg == 1 ? 0 : max(1, tstatus)); /* 0 indicates success */ -} - -unsigned int q_put (queue_t *q, void * msg, unsigned int msize, unsigned int MaxWait) -{ - int tstatus = 0, put_msg = 0, time_inc = (MaxWait + 999) /1000; - struct timespec timeout; - timeout.tv_nsec = 0; - - if (q_destroyed(q)) return 1; - pthread_mutex_lock (&q->q_guard); - while (q_full (q) && 0 == tstatus) { - if (MaxWait != INFINITE) { - timeout.tv_sec = time(NULL) + time_inc; - tstatus = pthread_cond_timedwait (&q->q_nf, &q->q_guard, &timeout); - } else { - tstatus = pthread_cond_wait (&q->q_nf, &q->q_guard); - } - } - /* Insert the message into the queue if there's room */ - if (0 == tstatus && !q_full (q)) { - q_insert (q, msg, msize); - put_msg = 1; - /* Signal that the queue is not empty as we've inserted a message */ - pthread_cond_broadcast (&q->q_ne); - } - pthread_mutex_unlock (&q->q_guard); - return (0 == tstatus && put_msg == 1 ? 0 : max(1, tstatus)); /* 0 indictates success */ -} - -unsigned int q_initialize (queue_t *q, unsigned int msize, unsigned int nmsgs) -{ - /* Initialize queue, including its mutex and events */ - /* Allocate storage for all messages. */ - - q->q_first = q->q_last = 0; - q->q_size = nmsgs; - q->q_destroyed = 0; - - pthread_mutex_init (&q->q_guard, NULL); - pthread_cond_init (&q->q_ne, NULL); - pthread_cond_init (&q->q_nf, NULL); - - if ((q->msg_array = calloc (nmsgs, msize)) == NULL) return 1; - return 0; /* No error */ -} - -unsigned int q_destroy (queue_t *q) -{ - if (q_destroyed(q)) return 1; - /* Free all the resources created by q_initialize */ - pthread_mutex_lock (&q->q_guard); - q->q_destroyed = 1; - free (q->msg_array); - pthread_cond_destroy (&q->q_ne); - pthread_cond_destroy (&q->q_nf); - pthread_mutex_unlock (&q->q_guard); - pthread_mutex_destroy (&q->q_guard); - - return 0; -} - -unsigned int q_destroyed (queue_t *q) -{ - return (q->q_destroyed); -} - -unsigned int q_empty (queue_t *q) -{ - return (q->q_first == q->q_last); -} - -unsigned int q_full (queue_t *q) -{ - return ((q->q_first - q->q_last) == 1 || - (q->q_last == q->q_size-1 && q->q_first == 0)); -} - - -unsigned int q_remove (queue_t *q, void * msg, unsigned int msize) -{ - char *pm; - - pm = (char *)q->msg_array; - /* Remove oldest ("first") message */ - memcpy (msg, pm + (q->q_first * msize), msize); - // Invalidate the message - q->q_first = ((q->q_first + 1) % q->q_size); - return 0; /* no error */ -} - -unsigned int q_insert (queue_t *q, void * msg, unsigned int msize) -{ - char *pm; - - pm = (char *)q->msg_array; - /* Add a new youngest ("last") message */ - if (q_full(q)) return 1; /* Error - Q is full */ - memcpy (pm + (q->q_last * msize), msg, msize); - q->q_last = ((q->q_last + 1) % q->q_size); - - return 0; -} - -unsigned int compute_checksum (void * msg, unsigned int length) -{ - /* Computer an xor checksum on the entire message of "length" - * integers */ - unsigned int i, cs = 0, *pint; - - pint = (unsigned int *) msg; - for (i = 0; i < length; i++) { - cs = (cs ^ *pint); - pint++; - } - return cs; -} - -void message_fill (msg_block_t *mblock, unsigned int src, unsigned int dest, unsigned int seqno) -{ - /* Fill the message buffer, and include checksum and timestamp */ - /* This function is called from the producer thread while it */ - /* owns the message block mutex */ - - unsigned int i; - - mblock->checksum = 0; - for (i = 0; i < DATA_SIZE; i++) { - mblock->data[i] = rand(); - } - mblock->source = src; - mblock->destination = dest; - mblock->sequence = seqno; - mblock->timestamp = time(NULL); - mblock->checksum = compute_checksum (mblock, sizeof(msg_block_t)/sizeof(unsigned int)); - /* printf ("Generated message: %d %d %d %d %x %x\n", - src, dest, seqno, mblock->timestamp, - mblock->data[0], mblock->data[DATA_SIZE-1]); */ - return; -} - -void message_display (msg_block_t *mblock) -{ - /* Display message buffer and timestamp, validate checksum */ - /* This function is called from the consumer thread while it */ - /* owns the message block mutex */ - unsigned int tcheck = 0; - - tcheck = compute_checksum (mblock, sizeof(msg_block_t)/sizeof(unsigned int)); - printf ("\nMessage number %d generated at: %s", - mblock->sequence, ctime (&(mblock->timestamp))); - printf ("Source and destination: %d %d\n", - mblock->source, mblock->destination); - printf ("First and last entries: %x %x\n", - mblock->data[0], mblock->data[DATA_SIZE-1]); - if (tcheck == 0 /*mblock->checksum was 0 when CS first computed */) - printf ("GOOD ->Checksum was validated.\n"); - else - printf ("BAD ->Checksum failed. message was corrupted\n"); - - return; - -} +/* + This source code is taken directly from examples in the book + Windows System Programming, Edition 4 by Johnson (John) Hart + + Session 6, Chapter 10. ThreeStage.c + + Several required additional header and source files from the + book examples have been included inline to simplify building. + The only modification to the code has been to provide default + values when run without arguments. + + Three-stage Producer Consumer system + Other files required in this project, either directly or + in the form of libraries (DLLs are preferable) + QueueObj.c (inlined here) + Messages.c (inlined here) + + Usage: ThreeStage npc goal [display] + start up "npc" paired producer and consumer threads. + Display messages if "display" is non-zero + Each producer must produce a total of + "goal" messages, where each message is tagged + with the consumer that should receive it + Messages are sent to a "transmitter thread" which performs + additional processing before sending message groups to the + "receiver thread." Finally, the receiver thread sends + the messages to the consumer threads. + + Transmitter: Receive messages one at a time from producers, + create a transmission message of up to "TBLOCK_SIZE" messages + to be sent to the Receiver. (this could be a network xfer + Receiver: Take message blocks sent by the Transmitter + and send the individual messages to the designated consumer + */ + +/* Suppress warning re use of ctime() */ +#define _CRT_SECURE_NO_WARNINGS 1 + +#include "test.h" +#define sleep(i) Sleep(i*1000) +#ifndef max +#define max(a,b) ((a) > (b) ? (a) : (b)) +#endif + +#define DATA_SIZE 256 +typedef struct msg_block_tag { /* Message block */ + pthread_mutex_t mguard; /* Mutex for the message block */ + pthread_cond_t mconsumed; /* Event: Message consumed; */ + /* Produce a new one or stop */ + pthread_cond_t mready; /* Event: Message ready */ + /* + * Note: the mutex and events are not used by some programs, such + * as Program 10-3, 4, 5 (the multi-stage pipeline) as the messages + * are part of a protected queue + */ + volatile unsigned int source; /* Creating producer identity */ + volatile unsigned int destination;/* Identity of receiving thread*/ + + volatile unsigned int f_consumed; + volatile unsigned int f_ready; + volatile unsigned int f_stop; + /* Consumed & ready state flags, stop flag */ + volatile unsigned int sequence; /* Message block sequence number */ + time_t timestamp; + unsigned int checksum; /* Message contents checksum */ + unsigned int data[DATA_SIZE]; /* Message Contents */ +} msg_block_t; + +void message_fill (msg_block_t *, unsigned int, unsigned int, unsigned int); +void message_display (msg_block_t *); + +#define CV_TIMEOUT 5 /* tunable parameter for the CV model */ + + +/* + Definitions of a synchronized, general bounded queue structure. + Queues are implemented as arrays with indices to youngest + and oldest messages, with wrap around. + Each queue also contains a guard mutex and + "not empty" and "not full" condition variables. + Finally, there is a pointer to an array of messages of + arbitrary type + */ + +typedef struct queue_tag { /* General purpose queue */ + pthread_mutex_t q_guard;/* Guard the message block */ + pthread_cond_t q_ne; /* Event: Queue is not empty */ + pthread_cond_t q_nf; /* Event: Queue is not full */ + /* These two events are manual-reset for the broadcast model + * and auto-reset for the signal model */ + volatile unsigned int q_size; /* Queue max size size */ + volatile unsigned int q_first; /* Index of oldest message */ + volatile unsigned int q_last; /* Index of youngest msg */ + volatile unsigned int q_destroyed;/* Q receiver has terminated */ + void * msg_array; /* array of q_size messages */ +} queue_t; + +/* Queue management functions */ +unsigned int q_initialize (queue_t *, unsigned int, unsigned int); +unsigned int q_destroy (queue_t *); +unsigned int q_destroyed (queue_t *); +unsigned int q_empty (queue_t *); +unsigned int q_full (queue_t *); +unsigned int q_get (queue_t *, void *, unsigned int, unsigned int); +unsigned int q_put (queue_t *, void *, unsigned int, unsigned int); +unsigned int q_remove (queue_t *, void *, unsigned int); +unsigned int q_insert (queue_t *, void *, unsigned int); + +#include +#include +#include + +#define DELAY_COUNT 1000 +#define MAX_THREADS 1024 + +/* Queue lengths and blocking factors. These numbers are arbitrary and */ +/* can be adjusted for performance tuning. The current values are */ +/* not well balanced. */ + +#define TBLOCK_SIZE 5 /* Transmitter combines this many messages at at time */ +#define Q_TIMEOUT 2000 /* Transmiter and receiver timeout (ms) waiting for messages */ +//#define Q_TIMEOUT INFINITE +#define MAX_RETRY 5 /* Number of q_get retries before quitting */ +#define P2T_QLEN 10 /* Producer to Transmitter queue length */ +#define T2R_QLEN 4 /* Transmitter to Receiver queue length */ +#define R2C_QLEN 4 /* Receiver to Consumer queue length - there is one + * such queue for each consumer */ + +void * producer (void *); +void * consumer (void *); +void * transmitter (void *); +void * receiver (void *); + + +typedef struct _THARG { + volatile unsigned int thread_number; + volatile unsigned int work_goal; /* used by producers */ + volatile unsigned int work_done; /* Used by producers and consumers */ +} THARG; + + +/* Grouped messages sent by the transmitter to receiver */ +typedef struct T2R_MSG_TYPEag { + volatile unsigned int num_msgs; /* Number of messages contained */ + msg_block_t messages [TBLOCK_SIZE]; +} T2R_MSG_TYPE; + +queue_t p2tq, t2rq, *r2cq_array; + +/* ShutDown, AllProduced are global flags to shut down the system & transmitter */ +static volatile unsigned int ShutDown = 0; +static volatile unsigned int AllProduced = 0; +static unsigned int DisplayMessages = 0; + +int main (int argc, char * argv[]) +{ + unsigned int tstatus = 0, nthread, ithread, goal, thid; + pthread_t *producer_th, *consumer_th, transmitter_th, receiver_th; + THARG *producer_arg, *consumer_arg; + + if (argc < 3) { + nthread = 32; + goal = 1000; + } else { + nthread = atoi(argv[1]); + goal = atoi(argv[2]); + if (argc >= 4) + DisplayMessages = atoi(argv[3]); + } + + srand ((int)time(NULL)); /* Seed the RN generator */ + + if (nthread > MAX_THREADS) { + printf ("Maximum number of producers or consumers is %d.\n", MAX_THREADS); + return 2; + } + producer_th = (pthread_t *) malloc (nthread * sizeof(pthread_t)); + producer_arg = (THARG *) calloc (nthread, sizeof (THARG)); + consumer_th = (pthread_t *) malloc (nthread * sizeof(pthread_t)); + consumer_arg = (THARG *) calloc (nthread, sizeof (THARG)); + + if (producer_th == NULL || producer_arg == NULL + || consumer_th == NULL || consumer_arg == NULL) + perror ("Cannot allocate working memory for threads."); + + q_initialize (&p2tq, sizeof(msg_block_t), P2T_QLEN); + q_initialize (&t2rq, sizeof(T2R_MSG_TYPE), T2R_QLEN); + /* Allocate and initialize Receiver to Consumer queue for each consumer */ + r2cq_array = (queue_t *) calloc (nthread, sizeof(queue_t)); + if (r2cq_array == NULL) perror ("Cannot allocate memory for r2c queues"); + + for (ithread = 0; ithread < nthread; ithread++) { + /* Initialize r2c queue for this consumer thread */ + q_initialize (&r2cq_array[ithread], sizeof(msg_block_t), R2C_QLEN); + /* Fill in the thread arg */ + consumer_arg[ithread].thread_number = ithread; + consumer_arg[ithread].work_goal = goal; + consumer_arg[ithread].work_done = 0; + + tstatus = pthread_create (&consumer_th[ithread], NULL, + consumer, (void *)&consumer_arg[ithread]); + if (tstatus != 0) + perror ("Cannot create consumer thread"); + + producer_arg[ithread].thread_number = ithread; + producer_arg[ithread].work_goal = goal; + producer_arg[ithread].work_done = 0; + tstatus = pthread_create (&producer_th[ithread], NULL, + producer, (void *)&producer_arg[ithread]); + if (tstatus != 0) + perror ("Cannot create producer thread"); + } + + tstatus = pthread_create (&transmitter_th, NULL, transmitter, &thid); + if (tstatus != 0) + perror ("Cannot create tranmitter thread"); + tstatus = pthread_create (&receiver_th, NULL, receiver, &thid); + if (tstatus != 0) + perror ("Cannot create receiver thread"); + + + printf ("BOSS: All threads are running\n"); + /* Wait for the producers to complete */ + /* The implementation allows too many threads for WaitForMultipleObjects */ + /* although you could call WFMO in a loop */ + for (ithread = 0; ithread < nthread; ithread++) { + tstatus = pthread_join (producer_th[ithread], NULL); + if (tstatus != 0) + perror ("Cannot wait for producer thread"); + printf ("BOSS: Producer %d produced %d work units\n", + ithread, producer_arg[ithread].work_done); + } + /* Producers have completed their work. */ + printf ("BOSS: All producers have completed their work.\n"); + AllProduced = 1; + + /* Wait for the consumers to complete */ + for (ithread = 0; ithread < nthread; ithread++) { + tstatus = pthread_join (consumer_th[ithread], NULL); + if (tstatus != 0) + perror ("Cannot wait for consumer thread"); + printf ("BOSS: consumer %d consumed %d work units\n", + ithread, consumer_arg[ithread].work_done); + } + printf ("BOSS: All consumers have completed their work.\n"); + + ShutDown = 1; /* Set a shutdown flag - All messages have been consumed */ + + /* Wait for the transmitter and receiver */ + + tstatus = pthread_join (transmitter_th, NULL); + if (tstatus != 0) + perror ("Failed waiting for transmitter"); + tstatus = pthread_join (receiver_th, NULL); + if (tstatus != 0) + perror ("Failed waiting for receiver"); + + q_destroy (&p2tq); + q_destroy (&t2rq); + for (ithread = 0; ithread < nthread; ithread++) + q_destroy (&r2cq_array[ithread]); + free (r2cq_array); + free (producer_th); + free (consumer_th); + free (producer_arg); + free(consumer_arg); + printf ("System has finished. Shutting down\n"); + return 0; +} + +void * producer (void * arg) +{ + THARG * parg; + unsigned int ithread, tstatus = 0; + msg_block_t msg; + + parg = (THARG *)arg; + ithread = parg->thread_number; + + while (parg->work_done < parg->work_goal && !ShutDown) { + /* Periodically produce work units until the goal is satisfied */ + /* messages receive a source and destination address which are */ + /* the same in this case but could, in general, be different. */ + sleep (rand()/100000000); + message_fill (&msg, ithread, ithread, parg->work_done); + + /* put the message in the queue - Use an infinite timeout to assure + * that the message is inserted, even if consumers are delayed */ + tstatus = q_put (&p2tq, &msg, sizeof(msg), INFINITE); + if (0 == tstatus) { + parg->work_done++; + } + } + + return 0; +} + +void * consumer (void * arg) +{ + THARG * carg; + unsigned int tstatus = 0, ithread, Retries = 0; + msg_block_t msg; + queue_t *pr2cq; + + carg = (THARG *) arg; + ithread = carg->thread_number; + + carg = (THARG *)arg; + pr2cq = &r2cq_array[ithread]; + + while (carg->work_done < carg->work_goal && Retries < MAX_RETRY && !ShutDown) { + /* Receive and display/process messages */ + /* Try to receive the requested number of messages, + * but allow for early system shutdown */ + + tstatus = q_get (pr2cq, &msg, sizeof(msg), Q_TIMEOUT); + if (0 == tstatus) { + if (DisplayMessages > 0) message_display (&msg); + carg->work_done++; + Retries = 0; + } else { + Retries++; + } + } + + return NULL; +} + +void * transmitter (void * arg) +{ + + /* Obtain multiple producer messages, combining into a single */ + /* compound message for the receiver */ + + unsigned int tstatus = 0, im, Retries = 0; + T2R_MSG_TYPE t2r_msg = {0}; + msg_block_t p2t_msg; + + while (!ShutDown && !AllProduced) { + t2r_msg.num_msgs = 0; + /* pack the messages for transmission to the receiver */ + im = 0; + while (im < TBLOCK_SIZE && !ShutDown && Retries < MAX_RETRY && !AllProduced) { + tstatus = q_get (&p2tq, &p2t_msg, sizeof(p2t_msg), Q_TIMEOUT); + if (0 == tstatus) { + memcpy (&t2r_msg.messages[im], &p2t_msg, sizeof(p2t_msg)); + t2r_msg.num_msgs++; + im++; + Retries = 0; + } else { /* Timed out. */ + Retries++; + } + } + tstatus = q_put (&t2rq, &t2r_msg, sizeof(t2r_msg), INFINITE); + if (tstatus != 0) return NULL; + } + return NULL; +} + + +void * receiver (void * arg) +{ + /* Obtain compound messages from the transmitter and unblock them */ + /* and transmit to the designated consumer. */ + + unsigned int tstatus = 0, im, ic, Retries = 0; + T2R_MSG_TYPE t2r_msg; + msg_block_t r2c_msg; + + while (!ShutDown && Retries < MAX_RETRY) { + tstatus = q_get (&t2rq, &t2r_msg, sizeof(t2r_msg), Q_TIMEOUT); + if (tstatus != 0) { /* Timeout - Have the producers shut down? */ + Retries++; + continue; + } + Retries = 0; + /* Distribute the packaged messages to the proper consumer */ + im = 0; + while (im < t2r_msg.num_msgs) { + memcpy (&r2c_msg, &t2r_msg.messages[im], sizeof(r2c_msg)); + ic = r2c_msg.destination; /* Destination consumer */ + tstatus = q_put (&r2cq_array[ic], &r2c_msg, sizeof(r2c_msg), INFINITE); + if (0 == tstatus) im++; + } + } + return NULL; +} + +#if (!defined INFINITE) +#define INFINITE 0xFFFFFFFF +#endif + +/* + Finite bounded queue management functions + q_get, q_put timeouts (max_wait) are in ms - convert to sec, rounding up + */ +unsigned int q_get (queue_t *q, void * msg, unsigned int msize, unsigned int MaxWait) +{ + int tstatus = 0, got_msg = 0, time_inc = (MaxWait + 999) /1000; + struct timespec timeout; + timeout.tv_nsec = 0; + + if (q_destroyed(q)) return 1; + pthread_mutex_lock (&q->q_guard); + while (q_empty (q) && 0 == tstatus) { + if (MaxWait != INFINITE) { + timeout.tv_sec = time(NULL) + time_inc; + tstatus = pthread_cond_timedwait (&q->q_ne, &q->q_guard, &timeout); + } else { + tstatus = pthread_cond_wait (&q->q_ne, &q->q_guard); + } + } + /* remove the message, if any, from the queue */ + if (0 == tstatus && !q_empty (q)) { + q_remove (q, msg, msize); + got_msg = 1; + /* Signal that the queue is not full as we've removed a message */ + pthread_cond_broadcast (&q->q_nf); + } + pthread_mutex_unlock (&q->q_guard); + return (0 == tstatus && got_msg == 1 ? 0 : max(1, tstatus)); /* 0 indicates success */ +} + +unsigned int q_put (queue_t *q, void * msg, unsigned int msize, unsigned int MaxWait) +{ + int tstatus = 0, put_msg = 0, time_inc = (MaxWait + 999) /1000; + struct timespec timeout; + timeout.tv_nsec = 0; + + if (q_destroyed(q)) return 1; + pthread_mutex_lock (&q->q_guard); + while (q_full (q) && 0 == tstatus) { + if (MaxWait != INFINITE) { + timeout.tv_sec = time(NULL) + time_inc; + tstatus = pthread_cond_timedwait (&q->q_nf, &q->q_guard, &timeout); + } else { + tstatus = pthread_cond_wait (&q->q_nf, &q->q_guard); + } + } + /* Insert the message into the queue if there's room */ + if (0 == tstatus && !q_full (q)) { + q_insert (q, msg, msize); + put_msg = 1; + /* Signal that the queue is not empty as we've inserted a message */ + pthread_cond_broadcast (&q->q_ne); + } + pthread_mutex_unlock (&q->q_guard); + return (0 == tstatus && put_msg == 1 ? 0 : max(1, tstatus)); /* 0 indictates success */ +} + +unsigned int q_initialize (queue_t *q, unsigned int msize, unsigned int nmsgs) +{ + /* Initialize queue, including its mutex and events */ + /* Allocate storage for all messages. */ + + q->q_first = q->q_last = 0; + q->q_size = nmsgs; + q->q_destroyed = 0; + + pthread_mutex_init (&q->q_guard, NULL); + pthread_cond_init (&q->q_ne, NULL); + pthread_cond_init (&q->q_nf, NULL); + + if ((q->msg_array = calloc (nmsgs, msize)) == NULL) return 1; + return 0; /* No error */ +} + +unsigned int q_destroy (queue_t *q) +{ + if (q_destroyed(q)) return 1; + /* Free all the resources created by q_initialize */ + pthread_mutex_lock (&q->q_guard); + q->q_destroyed = 1; + free (q->msg_array); + pthread_cond_destroy (&q->q_ne); + pthread_cond_destroy (&q->q_nf); + pthread_mutex_unlock (&q->q_guard); + pthread_mutex_destroy (&q->q_guard); + + return 0; +} + +unsigned int q_destroyed (queue_t *q) +{ + return (q->q_destroyed); +} + +unsigned int q_empty (queue_t *q) +{ + return (q->q_first == q->q_last); +} + +unsigned int q_full (queue_t *q) +{ + return ((q->q_first - q->q_last) == 1 || + (q->q_last == q->q_size-1 && q->q_first == 0)); +} + + +unsigned int q_remove (queue_t *q, void * msg, unsigned int msize) +{ + char *pm; + + pm = (char *)q->msg_array; + /* Remove oldest ("first") message */ + memcpy (msg, pm + (q->q_first * msize), msize); + // Invalidate the message + q->q_first = ((q->q_first + 1) % q->q_size); + return 0; /* no error */ +} + +unsigned int q_insert (queue_t *q, void * msg, unsigned int msize) +{ + char *pm; + + pm = (char *)q->msg_array; + /* Add a new youngest ("last") message */ + if (q_full(q)) return 1; /* Error - Q is full */ + memcpy (pm + (q->q_last * msize), msg, msize); + q->q_last = ((q->q_last + 1) % q->q_size); + + return 0; +} + +unsigned int compute_checksum (void * msg, unsigned int length) +{ + /* Computer an xor checksum on the entire message of "length" + * integers */ + unsigned int i, cs = 0, *pint; + + pint = (unsigned int *) msg; + for (i = 0; i < length; i++) { + cs = (cs ^ *pint); + pint++; + } + return cs; +} + +void message_fill (msg_block_t *mblock, unsigned int src, unsigned int dest, unsigned int seqno) +{ + /* Fill the message buffer, and include checksum and timestamp */ + /* This function is called from the producer thread while it */ + /* owns the message block mutex */ + + unsigned int i; + + mblock->checksum = 0; + for (i = 0; i < DATA_SIZE; i++) { + mblock->data[i] = rand(); + } + mblock->source = src; + mblock->destination = dest; + mblock->sequence = seqno; + mblock->timestamp = time(NULL); + mblock->checksum = compute_checksum (mblock, sizeof(msg_block_t)/sizeof(unsigned int)); + /* printf ("Generated message: %d %d %d %d %x %x\n", + src, dest, seqno, mblock->timestamp, + mblock->data[0], mblock->data[DATA_SIZE-1]); */ + return; +} + +void message_display (msg_block_t *mblock) +{ + /* Display message buffer and timestamp, validate checksum */ + /* This function is called from the consumer thread while it */ + /* owns the message block mutex */ + unsigned int tcheck = 0; + + tcheck = compute_checksum (mblock, sizeof(msg_block_t)/sizeof(unsigned int)); + printf ("\nMessage number %d generated at: %s", + mblock->sequence, ctime (&(mblock->timestamp))); + printf ("Source and destination: %d %d\n", + mblock->source, mblock->destination); + printf ("First and last entries: %x %x\n", + mblock->data[0], mblock->data[DATA_SIZE-1]); + if (tcheck == 0 /*mblock->checksum was 0 when CS first computed */) + printf ("GOOD ->Checksum was validated.\n"); + else + printf ("BAD ->Checksum failed. message was corrupted\n"); + + return; + +} diff --git a/tests/timeouts.c b/tests/timeouts.c index 1362d08d..e63a8ead 100644 --- a/tests/timeouts.c +++ b/tests/timeouts.c @@ -1,252 +1,249 @@ -/* - * File: timeouts.c - * - * - * -------------------------------------------------------------------------- - * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors - * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * -------------------------------------------------------------------------- - * - * Test Synopsis: - * - confirm accuracy of abstime calculations and timeouts - * - * Test Method (Validation or Falsification): - * - time actual CV wait timeout using a sequence of increasing sub 1 second timeouts. - * - * Requirements Tested: - * - - * - * Features Tested: - * - - * - * Cases Tested: - * - - * - * Description: - * - - * - * Environment: - * - - * - * Input: - * - None. - * - * Output: - * - Printed measured elapsed time should closely match specified timeout. - * - Return code should always be ETIMEDOUT (usually 138 but possibly 10060) - * - * Assumptions: - * - - * - * Pass Criteria: - * - Relies on observation. - * - * Fail Criteria: - * - - */ - -#include "test.h" - -/* - */ - -#include -#include -#include -#include -#include -#include - -#include "pthread.h" - -#define DEFAULT_MINTIME_INIT 999999999 -#define CYG_ONEBILLION 1000000000LL -#define CYG_ONEMILLION 1000000LL -#define CYG_ONEKAPPA 1000LL - -#if defined(_MSC_VER) && (_MSC_VER > 1200) -typedef long long cyg_tim_t; //msvc > 6.0 -#else -typedef int64_t cyg_tim_t; //msvc 6.0 -#endif - -LARGE_INTEGER frequency; -LARGE_INTEGER global_start; - -cyg_tim_t CYG_DIFFT(cyg_tim_t t1, cyg_tim_t t2) -{ - return (cyg_tim_t)((t2 - t1) * CYG_ONEBILLION / frequency.QuadPart); //nsec -} - -void CYG_InitTimers() -{ - QueryPerformanceFrequency(&frequency); - global_start.QuadPart = 0; -} - -void CYG_MARK1(cyg_tim_t *T) -{ - LARGE_INTEGER curTime; - QueryPerformanceCounter (&curTime); - *T = (curTime.QuadPart);// + global_start.QuadPart); -} - -///////////////////GetTimestampTS///////////////// - -#if 1 - -int GetTimestampTS(struct timespec *tv) -{ - struct _timeb timebuffer; - -#if !(_MSC_VER <= 1200) - _ftime64_s( &timebuffer ); //msvc > 6.0 -#else - _ftime( &timebuffer ); //msvc = 6.0 -#endif - - tv->tv_sec = timebuffer.time; - tv->tv_nsec = 1000000L * timebuffer.millitm; - return 0; -} - -#else - -int GetTimestampTS(struct timespec *tv) -{ - static LONGLONG epoch = 0; - SYSTEMTIME local; - FILETIME abs; - LONGLONG now; - - if(!epoch) { - memset(&local,0,sizeof(SYSTEMTIME)); - local.wYear = 1970; - local.wMonth = 1; - local.wDay = 1; - local.wHour = 0; - local.wMinute = 0; - local.wSecond = 0; - SystemTimeToFileTime(&local, &abs); - epoch = *(LONGLONG *)&abs; - } - GetSystemTime(&local); - SystemTimeToFileTime(&local, &abs); - now = *(LONGLONG *)&abs; - now = now - epoch; - tv->tv_sec = (long)(now / 10000000); - tv->tv_nsec = (long)((now * 100) % 1000000000); - - return 0; -} - -#endif - -///////////////////GetTimestampTS///////////////// - - -#define MSEC_F 1000000L -#define USEC_F 1000L -#define NSEC_F 1L - -pthread_mutexattr_t mattr_; -pthread_mutex_t mutex_; -pthread_condattr_t cattr_; -pthread_cond_t cv_; - -int Init(void) -{ - pthread_mutexattr_init(&mattr_); - pthread_mutex_init(&mutex_, &mattr_); - pthread_condattr_init(&cattr_); - pthread_cond_init(&cv_, &cattr_); - return 0; -} - -int Destroy(void) -{ - pthread_cond_destroy(&cv_); - pthread_mutex_destroy(&mutex_); - pthread_mutexattr_destroy(&mattr_); - pthread_condattr_destroy(&cattr_); - return 0; -} - -int Wait(time_t sec, long nsec) -{ - struct timespec abstime; - long sc; - int result = 0; - GetTimestampTS(&abstime); - abstime.tv_sec += sec; - abstime.tv_nsec += nsec; - if((sc = (abstime.tv_nsec / 1000000000L))){ - abstime.tv_sec += sc; - abstime.tv_nsec %= 1000000000L; - } - pthread_mutex_lock(&mutex_); - /* - * We don't need to check the CV. - */ - result = pthread_cond_timedwait(&cv_, &mutex_, &abstime); - pthread_mutex_unlock(&mutex_); - return result; -} - -char tbuf[128]; -void printtim(cyg_tim_t rt, cyg_tim_t dt, int wres) -{ - printf("wait result [%d]: timeout(ms) [expected/actual]: %ld/%ld\n", wres, (long)(rt/CYG_ONEMILLION), (long)(dt/CYG_ONEMILLION)); -} - - -int main(int argc, char* argv[]) -{ - int i = 0; - int wres = 0; - cyg_tim_t t1, t2, dt, rt; - - CYG_InitTimers(); - - Init(); - - while(i++ < 10){ - rt = 90*i*MSEC_F; - CYG_MARK1(&t1); - wres = Wait(0, (long)(size_t)rt); - CYG_MARK1(&t2); - dt = CYG_DIFFT(t1, t2); - printtim(rt, dt, wres); - } - - Destroy(); - - return 0; -} +/* + * File: timeouts.c + * + * + * -------------------------------------------------------------------------- + * + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors + * + * Homepage: https://sourceforge.net/projects/pthreads4w/ + * + * The current list of contributors is contained + * in the file CONTRIBUTORS included with the source + * code distribution. The list can also be seen at the + * following World Wide Web location: + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * -------------------------------------------------------------------------- + * + * Test Synopsis: + * - confirm accuracy of abstime calculations and timeouts + * + * Test Method (Validation or Falsification): + * - time actual CV wait timeout using a sequence of increasing sub 1 second timeouts. + * + * Requirements Tested: + * - + * + * Features Tested: + * - + * + * Cases Tested: + * - + * + * Description: + * - + * + * Environment: + * - + * + * Input: + * - None. + * + * Output: + * - Printed measured elapsed time should closely match specified timeout. + * - Return code should always be ETIMEDOUT (usually 138 but possibly 10060) + * + * Assumptions: + * - + * + * Pass Criteria: + * - Relies on observation. + * + * Fail Criteria: + * - + */ + +#include "test.h" + +/* + */ + +#include +#include +#include +#include +#include +#include + +#include "pthread.h" + +#define DEFAULT_MINTIME_INIT 999999999 +#define CYG_ONEBILLION 1000000000LL +#define CYG_ONEMILLION 1000000LL +#define CYG_ONEKAPPA 1000LL + +#if defined(_MSC_VER) && (_MSC_VER > 1200) +typedef long long cyg_tim_t; //msvc > 6.0 +#else +typedef int64_t cyg_tim_t; //msvc 6.0 +#endif + +LARGE_INTEGER frequency; +LARGE_INTEGER global_start; + +cyg_tim_t CYG_DIFFT(cyg_tim_t t1, cyg_tim_t t2) +{ + return (cyg_tim_t)((t2 - t1) * CYG_ONEBILLION / frequency.QuadPart); //nsec +} + +void CYG_InitTimers() +{ + QueryPerformanceFrequency(&frequency); + global_start.QuadPart = 0; +} + +void CYG_MARK1(cyg_tim_t *T) +{ + LARGE_INTEGER curTime; + QueryPerformanceCounter (&curTime); + *T = (curTime.QuadPart);// + global_start.QuadPart); +} + +///////////////////GetTimestampTS///////////////// + +#if 1 + +int GetTimestampTS(struct timespec *tv) +{ + struct _timeb timebuffer; + +#if !(_MSC_VER <= 1200) + _ftime64_s( &timebuffer ); //msvc > 6.0 +#else + _ftime( &timebuffer ); //msvc = 6.0 +#endif + + tv->tv_sec = timebuffer.time; + tv->tv_nsec = 1000000L * timebuffer.millitm; + return 0; +} + +#else + +int GetTimestampTS(struct timespec *tv) +{ + static LONGLONG epoch = 0; + SYSTEMTIME local; + FILETIME abs; + LONGLONG now; + + if(!epoch) { + memset(&local,0,sizeof(SYSTEMTIME)); + local.wYear = 1970; + local.wMonth = 1; + local.wDay = 1; + local.wHour = 0; + local.wMinute = 0; + local.wSecond = 0; + SystemTimeToFileTime(&local, &abs); + epoch = *(LONGLONG *)&abs; + } + GetSystemTime(&local); + SystemTimeToFileTime(&local, &abs); + now = *(LONGLONG *)&abs; + now = now - epoch; + tv->tv_sec = (long)(now / 10000000); + tv->tv_nsec = (long)((now * 100) % 1000000000); + + return 0; +} + +#endif + +///////////////////GetTimestampTS///////////////// + + +#define MSEC_F 1000000L +#define USEC_F 1000L +#define NSEC_F 1L + +pthread_mutexattr_t mattr_; +pthread_mutex_t mutex_; +pthread_condattr_t cattr_; +pthread_cond_t cv_; + +int Init(void) +{ + pthread_mutexattr_init(&mattr_); + pthread_mutex_init(&mutex_, &mattr_); + pthread_condattr_init(&cattr_); + pthread_cond_init(&cv_, &cattr_); + return 0; +} + +int Destroy(void) +{ + pthread_cond_destroy(&cv_); + pthread_mutex_destroy(&mutex_); + pthread_mutexattr_destroy(&mattr_); + pthread_condattr_destroy(&cattr_); + return 0; +} + +int Wait(time_t sec, long nsec) +{ + struct timespec abstime; + long sc; + int result = 0; + GetTimestampTS(&abstime); + abstime.tv_sec += sec; + abstime.tv_nsec += nsec; + if((sc = (abstime.tv_nsec / 1000000000L))){ + abstime.tv_sec += sc; + abstime.tv_nsec %= 1000000000L; + } + pthread_mutex_lock(&mutex_); + /* + * We don't need to check the CV. + */ + result = pthread_cond_timedwait(&cv_, &mutex_, &abstime); + pthread_mutex_unlock(&mutex_); + return result; +} + +char tbuf[128]; +void printtim(cyg_tim_t rt, cyg_tim_t dt, int wres) +{ + printf("wait result [%d]: timeout(ms) [expected/actual]: %ld/%ld\n", wres, (long)(rt/CYG_ONEMILLION), (long)(dt/CYG_ONEMILLION)); +} + + +int main(int argc, char* argv[]) +{ + int i = 0; + int wres = 0; + cyg_tim_t t1, t2, dt, rt; + + CYG_InitTimers(); + + Init(); + + while(i++ < 10){ + rt = 90*i*MSEC_F; + CYG_MARK1(&t1); + wres = Wait(0, (long)(size_t)rt); + CYG_MARK1(&t2); + dt = CYG_DIFFT(t1, t2); + printtim(rt, dt, wres); + } + + Destroy(); + + return 0; +} diff --git a/tests/tryentercs.c b/tests/tryentercs.c index f94e914e..97d95f5a 100644 --- a/tests/tryentercs.c +++ b/tests/tryentercs.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/tryentercs2.c b/tests/tryentercs2.c index 2df8cd82..515be2ab 100644 --- a/tests/tryentercs2.c +++ b/tests/tryentercs2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/tsd1.c b/tests/tsd1.c index 4a5ade2c..29d61437 100644 --- a/tests/tsd1.c +++ b/tests/tsd1.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * * -------------------------------------------------------------------------- diff --git a/tests/tsd2.c b/tests/tsd2.c index 471026a9..a9c3bb74 100644 --- a/tests/tsd2.c +++ b/tests/tsd2.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * * -------------------------------------------------------------------------- diff --git a/tests/tsd3.c b/tests/tsd3.c index af88f989..ef8eb44d 100644 --- a/tests/tsd3.c +++ b/tests/tsd3.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * * -------------------------------------------------------------------------- diff --git a/tests/valid1.c b/tests/valid1.c index 13266795..9b09364d 100644 --- a/tests/valid1.c +++ b/tests/valid1.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/tests/valid2.c b/tests/valid2.c index ea07d238..073fc071 100644 --- a/tests/valid2.c +++ b/tests/valid2.c @@ -4,33 +4,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * * -------------------------------------------------------------------------- * diff --git a/version.rc b/version.rc index 479f518a..c87a9f76 100644 --- a/version.rc +++ b/version.rc @@ -2,33 +2,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -129,15 +126,15 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "ProductName", "POSIX Threads for Windows LPGL\0" + VALUE "ProductName", "POSIX Threads for Windows\0" VALUE "ProductVersion", __PTW32_VERSION_STRING VALUE "FileVersion", __PTW32_VERSION_STRING VALUE "FileDescription", __PTW32_VERSIONINFO_DESCRIPTION VALUE "InternalName", __PTW32_VERSIONINFO_NAME VALUE "OriginalFilename", __PTW32_VERSIONINFO_NAME - VALUE "CompanyName", "Open Source Software community LGPL\0" - VALUE "LegalCopyright", "Copyright (C) Project contributors 2012\0" - VALUE "Comments", "http://sourceware.org/pthreads-win32/\0" + VALUE "CompanyName", "Open Source Software community\0" + VALUE "LegalCopyright", "Copyright - Project contributors 1999-2016\0" + VALUE "Comments", "https://sourceforge.net/p/pthreads4w/wiki/Contributors/\0" END END BLOCK "VarFileInfo" diff --git a/w32_CancelableWait.c b/w32_CancelableWait.c index 068affaf..58c11dec 100644 --- a/w32_CancelableWait.c +++ b/w32_CancelableWait.c @@ -6,33 +6,30 @@ * * -------------------------------------------------------------------------- * - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2012 Pthreads-win32 contributors + * Pthreads4w - POSIX Threads for Windows + * Copyright 1998 John E. Bossom + * Copyright 1999-2016, Pthreads4w contributors * - * Homepage1: http://sourceware.org/pthreads-win32/ - * Homepage2: http://sourceforge.net/projects/pthreads4w/ + * Homepage: https://sourceforge.net/projects/pthreads4w/ * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * https://sourceforge.net/p/pthreads4w/wiki/Contributors/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifdef HAVE_CONFIG_H