From 40f2c563eac59745d95d9ea06cd9dea64fa49c3b Mon Sep 17 00:00:00 2001
From: Ross Johnson POSIX Threads for Windows – REFERENCE –
-Pthreads-w32
+Pthreads4W
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 @@
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 @@
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.
Ross Johnson for use with Pthreads-w32.
+Ross Johnson for use with Pthreads4W.
POSIX threads API
reference
Miscellaneous POSIX
-thread safe routines provided by Pthreads-w32
Non-portable
-Pthreads-w32 routines
Other
Ross Johnson for use with Pthreads-w32.
+Ross Johnson for use with Pthreads4W.
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, 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 -
-#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); -
-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: -
-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)
-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) -. -
-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).
-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) -. -
-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) -. -
-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. -
-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. -
-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. -
-The pthread_attr_setaffinity function returns the following -error codes on error: -
--The pthread_attr_setdetachstate function returns the following -error codes on error: -
--The pthread_attr_setschedparam function returns the following -error codes on error: -
--The pthread_attr_setschedpolicy function returns the following -error codes on error: -
--The pthread_attr_setinheritsched function returns the -following error codes on error: -
--The pthread_attr_setscope function returns the following error -codes on error: -
-Xavier Leroy <Xavier.Leroy@inria.fr> -
-Modified by Ross Johnson for use with Pthreads-w32.
-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) . -
-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 +
+#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); +
+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: +
+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)
+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) +. +
+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).
+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) +. +
+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) +. +
+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. +
+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. +
+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. +
+The pthread_attr_setaffinity function returns the following +error codes on error: +
++The pthread_attr_setdetachstate function returns the following +error codes on error: +
++The pthread_attr_setschedparam function returns the following +error codes on error: +
++The pthread_attr_setschedpolicy function returns the following +error codes on error: +
++The pthread_attr_setinheritsched function returns the +following error codes on error: +
++The pthread_attr_setscope function returns the following error +codes on error: +
+Xavier Leroy <Xavier.Leroy@inria.fr> +
+Modified by Ross Johnson for use with Pthreads4W.
+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) . +
+pthread_attr_getstackaddr, pthread_attr_setstackaddr - get and set -the stackaddr attribute -
-#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);
-
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.
-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. -
-The pthread_attr_setstackaddr function always returns the -following error code: -
--The pthread_attr_getstackaddr function always returns the -following error code: -
--These functions shall not return an error code of [EINTR]. -
-The following sections are informative. -
-None. -
-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. -
-None. -
-None. -
-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> -
-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.
-pthread_attr_getstackaddr, pthread_attr_setstackaddr - get and set +the stackaddr attribute +
+#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);
+
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.
+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. +
+The pthread_attr_setstackaddr function always returns the +following error code: +
++The pthread_attr_getstackaddr function always returns the +following error code: +
++These functions shall not return an error code of [EINTR]. +
+The following sections are informative. +
+None. +
+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. +
+None. +
+None. +
+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> +
+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.
+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)
Upon successful completion, pthread_attr_getstacksize and @@ -87,7 +87,7 @@
Modified by Ross Johnson for use with Pthreads-w32.
+Modified by Ross Johnson for use with Pthreads4W.
Pthreads-w32 defines _POSIX_BARRIERS to indicate +
PThreads4W defines _POSIX_BARRIERS to indicate that these routines are implemented and may be used.
None. @@ -131,7 +131,7 @@
Modified by Ross Johnson for use with Pthreads-w32.
+Modified by Ross Johnson for use with Pthreads4W.
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.
None. @@ -117,7 +117,7 @@
Modified by Ross Johnson for use with Pthreads-w32.
+Modified by Ross Johnson for use with Pthreads4W.
Pthreads-w32 defines _POSIX_BARRIERS to indicate +
PThreads4W defines _POSIX_BARRIERS to indicate that these routines are implemented and may be used.
None. @@ -102,7 +102,7 @@
Modified by Ross Johnson for use with Pthreads-w32.
+Modified by Ross Johnson for use with Pthreads4W.
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 @@
These functions shall not return an error code of [EINTR].
@@ -90,7 +90,7 @@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 @@Modified by Ross Johnson for use with Pthreads-w32.
+Modified by Ross Johnson for use with Pthreads4W.
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 @@
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 @@
Xavier Leroy <Xavier.Leroy@inria.fr>
-Modified by Ross Johnson for use with Pthreads-w32.
+Modified by Ross Johnson for use with Pthreads4W.
pthread_exit(3) , pthread_cleanup_push(3) , pthread_cleanup_pop(3) -, Pthreads-w32 package README file 'Prerequisites' section. +, PThreads4W package README file 'Prerequisites' section.
POSIX specifies that a number of system calls (basically, all @@ -157,7 +157,7 @@
Modified by -Ross Johnson for use with Pthreads-w32.+Ross Johnson for use with PThreads4W.
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
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
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
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
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.
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
- - -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) . -
-
- - - + + + + +PTHREAD_CREATE(3) manual page + + + + + + + +POSIX Threads for Windows – REFERENCE - +Pthreads4W
+ + +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) . +
+
+ + + \ 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
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.
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
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 - - - - - - - - -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) -. -
-
- - - + + + + +PTHREAD_EQUAL(3) manual page + + + + + + + + +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) +. +
+
+ + + \ 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 - - - - - - - - -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) . -
-
- - - + + + + +PTHREAD_EXIT(3) manual page + + + + + + + + +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) . +
+
+ + + \ 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
+Pthreads4WName
@@ -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.
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
Name
@@ -28,7 +28,7 @@Return Value
Errors
None.
Author
-Ross Johnson for use with Pthreads-w32.
+Ross Johnson for use with Pthreads4W.
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
+Pthreads4WName
@@ -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
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
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
+Pthreads4WName
@@ -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
+Pthreads4WName
@@ -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
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.
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
Name
@@ -28,7 +28,7 @@Return Value
Errors
None.
Author
-Ross Johnson for use with Pthreads-w32.
+Ross Johnson for use with Pthreads4W.
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
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.
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
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.
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
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.
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
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.
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
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.
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
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.
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
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.
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
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.
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
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.
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
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 - Pthreads4WName
@@ -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.
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
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
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
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.
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 - PThreads4WName
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
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
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.
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
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.
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
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.
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
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.
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
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 Value
Errors
None.
Author
-Ross Johnson for use with Pthreads-w32.
+Ross Johnson for use with Pthreads4W.
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
+Pthreads4WName
@@ -47,7 +47,7 @@Return
Errors
None.
Author
-Ross Johnson for use with Pthreads-w32.
+Ross Johnson for use with Pthreads4W.
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
Name
@@ -39,7 +39,7 @@Return Value
Errors
None.
Author
-Ross Johnson for use with Pthreads-w32.
+Ross Johnson for use with Pthreads4W.
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
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.
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
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.
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 - Pthreads4WName
@@ -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.
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
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.
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
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
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